IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
NormalDistribution.h
Go to the documentation of this file.
1 // NormalDistribution.h:
3 // ---------------------
4 //
14 
15 #ifndef __IPSDKMATH_NORMALDISTRIBUTION_H__
16 #define __IPSDKMATH_NORMALDISTRIBUTION_H__
17 
19 #include <IPSDKMath/Constants.h>
20 
21 namespace ipsdk {
22 namespace math {
23 
26 
32  const ipReal64 stdDev,
33  const ipReal64 mean = 0);
34 
40  const ipReal64 stdDev,
41  const ipReal64 mean = 0);
42 
48  const ipReal64 stdDev,
49  const ipReal64 mean = 0);
50 
59  const ipReal64 stdDev,
60  const ipReal64 mean = 0);
61 
65 inline ipReal64
67  const ipReal64 stdDev,
68  const ipReal64 mean = 0)
69 {
70  if (dist < 0)
71  return 0;
72 
73  return 2 * (cumulativeNormalDistribution(mean + dist, stdDev, mean) - 0.5);
74 }
75 
78 
79 } // end of namespace math
80 } // end of namespace ipsdk
81 
82 #endif // __IPSDKMATH_NORMALDISTRIBUTION_H__
IPSDKMATH_API ipReal64 stdDev(const std::vector< T > &coll)
function allowing to compute standard deviation for a vector
Definition of import/export macro for library.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
IPSDKMATH_API ipReal64 normalDistributionSecondDerivative(const ipReal64 x, const ipReal64 stdDev, const ipReal64 mean=0)
function allowing to compute second derivative value for normal distribution
IPSDKMATH_API ipReal64 mean(const std::vector< T > &coll)
function allowing to compute mean for a vector
double ipReal64
Base types definition.
Definition: BaseTypes.h:57
IPSDKMATH_API ipReal64 normalDistributionFirstDerivative(const ipReal64 x, const ipReal64 stdDev, const ipReal64 mean=0)
function allowing to compute first derivative value for normal distribution
Predefined constants for ipsdk math library.
#define IPSDKMATH_API
Import/Export macro for library IPSDKMath.
Definition: IPSDKMathExports.h:27
IPSDKMATH_API ipReal64 cumulativeNormalDistribution(const ipReal64 x, const ipReal64 stdDev, const ipReal64 mean=0)
function allowing to approximate cumulative distribution function value for normal distribution ...
ipReal64 normalDistributionCoverage(const ipReal64 dist, const ipReal64 stdDev, const ipReal64 mean=0)
function allowing to approximate normal distribution ratio coverage of values at a given distance awa...
Definition: NormalDistribution.h:66
IPSDKMATH_API ipReal64 normalDistribution(const ipReal64 x, const ipReal64 stdDev, const ipReal64 mean=0)
function allowing to compute normal distribution value