GPRidge v1.0.0
GPR-accelerated saddle point searches on potential energy surfaces
☾
Toggle main menu visibility
Loading...
Searching...
No Matches
DistributionFunctions.h
Go to the documentation of this file.
1
//
2
// DistributionFunctions.h
3
// gpr_dimer
4
//
5
// Created by Maxim Masterov on 03/12/2020.
6
//
7
8
#ifndef DistributionFunctions_h
9
#define DistributionFunctions_h
10
11
#include <cmath>
12
13
namespace
math
{
17
class
DistributionFunctions
{
18
public
:
19
DistributionFunctions
() { }
20
~DistributionFunctions
() { }
21
30
inline
double
normalCDF
(
const
double
x
,
double
const
mu,
const
double
sigma)
31
{
32
double
x_loc = (
x
- mu) / sigma;
33
return
0.5 * erfc(-x_loc * M_SQRT1_2);
34
}
35
44
inline
double
normalCDFInverse
(
const
double
p,
double
const
mu,
45
const
double
sigma)
46
{
47
return
mu + sigma * M_SQRT2 *
erfinv
(2. * p - 1.);
48
}
49
57
double
erfinv
(
double
x
);
58
};
59
}
// namespace math
60
#endif
/* DistributionFunctions_h */
x
@ x
Definition
Enums.h:28
math::DistributionFunctions::normalCDF
double normalCDF(const double x, double const mu, const double sigma)
Normal cumulative distribution function.
Definition
DistributionFunctions.h:30
math::DistributionFunctions::~DistributionFunctions
~DistributionFunctions()
Definition
DistributionFunctions.h:20
math::DistributionFunctions::erfinv
double erfinv(double x)
Inverse error function NOTE: Abramowitz & Stegun rational approximation, taken from http://libit....
Definition
DistributionFunctions.cpp:12
math::DistributionFunctions::normalCDFInverse
double normalCDFInverse(const double p, double const mu, const double sigma)
Inverse complementary error function.
Definition
DistributionFunctions.h:44
math::DistributionFunctions::DistributionFunctions
DistributionFunctions()
Definition
DistributionFunctions.h:19
math
Definition
DistributionFunctions.cpp:10
backend
DistributionFunctions.h
Generated by
1.17.0
Generated by
Doxygen 1.17.0
Analytics by
Antics
provided by
TurtleTech ehf