Line data Source code
1 : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2 : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
3 : !!!! !!!!
4 : !!!! ParaMonte: Parallel Monte Carlo and Machine Learning Library. !!!!
5 : !!!! !!!!
6 : !!!! Copyright (C) 2012-present, The Computational Data Science Lab !!!!
7 : !!!! !!!!
8 : !!!! This file is part of the ParaMonte library. !!!!
9 : !!!! !!!!
10 : !!!! LICENSE !!!!
11 : !!!! !!!!
12 : !!!! https://github.com/cdslaborg/paramonte/blob/main/LICENSE.md !!!!
13 : !!!! !!!!
14 : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
15 : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16 :
17 : !> \brief
18 : !> This include file contains implementations of the procedures in module [pm_distEggBox](@ref pm_distEggBox).
19 : !>
20 : !> \finmain
21 : !>
22 : !> \author
23 : !> \AmirShahmoradi, Oct 16, 2009, 11:14 AM, Michigan
24 :
25 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
26 :
27 : real(RKC) , parameter :: ZERO = 0._RKC, ONE = 1._RKC, TWO = 2._RKC, PI = acos(-1._RKC)
28 : ! Define `X`
29 : #if DDAZ_ENABLED
30 : #define NORMEDX X
31 : #elif MSAZ_ENABLED
32 : #define NORMEDX ((X - mu) / sigma)
33 762006 : CHECK_ASSERTION(__LINE__, size(X) == size(mu), SK_"@getEggBoxLogUDF(): The condition `size(X) == size(mu)` must hold. size(X), size(mu) = "//getStr([size(X), size(mu)])) ! fpp
34 762006 : CHECK_ASSERTION(__LINE__, size(X) == size(sigma), SK_"@getEggBoxLogUDF(): The condition `size(X) == size(sigma)` must hold. size(X), size(sigma) = "//getStr([size(X), size(sigma)])) ! fpp
35 : #else
36 : #error "Unrecognized interface."
37 : #endif
38 : !%%%%%%%%%%%%%%%%%%%%%%
39 : #if getEggBoxLogUDF_ENABLED
40 : !%%%%%%%%%%%%%%%%%%%%%%
41 :
42 254003 : if (present(alpha)) then
43 2 : logUDF = (getOption(TWO, zeta) + product(cos(PI * NORMEDX))) ** alpha
44 : else
45 758005 : logUDF = (getOption(TWO, zeta) + product(cos(PI * NORMEDX))) ** 5
46 : end if
47 :
48 : #else
49 : !%%%%%%%%%%%%%%%%%%%%%%%%
50 : #error "Unrecognized interface."
51 : !%%%%%%%%%%%%%%%%%%%%%%%%
52 : #endif
53 : #undef NORMEDX
|