clProbDist
An OpenCL library for probability distributions
normal.h
Go to the documentation of this file.
1 /*
2  * Authors:
3  *
4  * Nabil Kemerchou <kemerchn@iro.umontreal.ca> (2015)
5  * David Munger <mungerd@iro.umontreal.ca> (2015)
6  * Pierre L'Ecuyer <lecuyer@iro.umontreal.ca> (2015)
7  *
8  */
9 
10 #pragma once
11 #ifndef CLPROBDIST_NORMALDIST_H
12 #define CLPROBDIST_NORMALDIST_H
13 
21 #include "clProbDist/clProbDist.h"
22 #include "clProbDist/continuous.h"
23 
28 typedef struct _clprobdistNormal clprobdistNormal;
29 
40 cl_double clprobdistStdNormalDensity(cl_double x, clprobdistStatus* err);
41 
44 cl_double clprobdistStdNormalCDF(cl_double x, clprobdistStatus* err);
45 
48 cl_double clprobdistStdNormalComplCDF(cl_double x, clprobdistStatus* err);
49 
52 cl_double clprobdistStdNormalInverseCDF(cl_double u, clprobdistStatus* err);
53 
57 //***********************************************************************
58 // Constructor and Destructor
59 //***********************************************************************
60 
78 clprobdistNormal* clprobdistNormalCreate(cl_double mu, cl_double sigma, size_t* bufSize, clprobdistStatus* err);
79 
82 clprobdistStatus clprobdistNormalDestroy(clprobdistNormal* dist);
83 
86 //***********************************************************************
87 // Implementation with Dist object
88 //***********************************************************************
89 
97 cl_double clprobdistNormalDensityWithObject(const clprobdistNormal* dist, cl_double x, clprobdistStatus* err);
98 
101 cl_double clprobdistNormalCDFWithObject(const clprobdistNormal* dist, cl_double x, clprobdistStatus* err);
102 
105 cl_double clprobdistNormalComplCDFWithObject(const clprobdistNormal* dist, cl_double x, clprobdistStatus* err);
106 
109 cl_double clprobdistNormalInverseCDFWithObject(const clprobdistNormal* dist, cl_double u, clprobdistStatus* err);
110 
113 cl_double clprobdistNormalMeanWithObject(const clprobdistNormal* dist, clprobdistStatus* err);
114 
117 cl_double clprobdistNormalVarianceWithObject(const clprobdistNormal* dist, clprobdistStatus* err);
118 
121 cl_double clprobdistNormalStdDeviationWithObject(const clprobdistNormal* dist, clprobdistStatus* err);
122 
129 cl_double clprobdistNormalGetMu(const clprobdistNormal* dist, clprobdistStatus* err);
130 
137 cl_double clprobdistNormalGetSigma(const clprobdistNormal* dist, clprobdistStatus* err);
138 
142 //***********************************************************************
143 // Implementation of static functions
144 //***********************************************************************
145 
161 cl_double clprobdistNormalDensity(cl_double mu, cl_double sigma, cl_double x, clprobdistStatus* err);
162 
173 cl_double clprobdistNormalCDF(cl_double mu, cl_double sigma, cl_double x, clprobdistStatus* err);
174 
185 cl_double clprobdistNormalComplCDF(cl_double mu, cl_double sigma, cl_double x, clprobdistStatus* err);
186 
197 cl_double clprobdistNormalInverseCDF(cl_double mu, cl_double sigma, cl_double u, clprobdistStatus* err);
198 
208 cl_double clprobdistNormalMean(cl_double mu, cl_double sigma, clprobdistStatus* err);
209 
219 cl_double clprobdistNormalVariance(cl_double mu, cl_double sigma, clprobdistStatus* err);
220 
230 cl_double clprobdistNormalStdDeviation(cl_double mu, cl_double sigma, clprobdistStatus* err);
231 
236 #endif
struct _clprobdistNormal clprobdistNormal
Normal distribution object [device].
Definition: normal.clh:50
cl_double clprobdistNormalCDF(cl_double mu, cl_double sigma, cl_double x, clprobdistStatus *err)
Cumulative density function [device].
cl_double clprobdistNormalStdDeviation(cl_double mu, cl_double sigma, clprobdistStatus *err)
Standard deviation of the distribution [device].
cl_double clprobdistNormalDensity(cl_double mu, cl_double sigma, cl_double x, clprobdistStatus *err)
Probability density function [device].
cl_double clprobdistNormalInverseCDF(cl_double mu, cl_double sigma, cl_double u, clprobdistStatus *err)
Inverse cumulative density function [device].
Library definitions common to all probability distributions.
cl_double clprobdistNormalComplCDFWithObject(const clprobdistNormal *dist, cl_double x, clprobdistStatus *err)
Complementary CDF or reliability function [device].
cl_double clprobdistNormalComplCDF(cl_double mu, cl_double sigma, cl_double x, clprobdistStatus *err)
Complementary CDF or reliability function [device].
cl_double clprobdistNormalVariance(cl_double mu, cl_double sigma, clprobdistStatus *err)
Variance of the distribution [device].
cl_double clprobdistNormalCDFWithObject(const clprobdistNormal *dist, cl_double x, clprobdistStatus *err)
Cumulative density function [device].
clprobdistStatus clprobdistNormalDestroy(clprobdistNormal *dist)
Destroy a distribution object.
cl_double clprobdistNormalGetSigma(const clprobdistNormal *dist, clprobdistStatus *err)
Return the standard deviation.
cl_double clprobdistNormalGetMu(const clprobdistNormal *dist, clprobdistStatus *err)
Return the mean.
cl_double clprobdistNormalVarianceWithObject(const clprobdistNormal *dist, clprobdistStatus *err)
Variance of the distribution [device].
cl_double clprobdistNormalMean(cl_double mu, cl_double sigma, clprobdistStatus *err)
Mean of the distribution [device].
cl_double clprobdistStdNormalComplCDF(cl_double x, clprobdistStatus *err)
Complementary CDF or reliability function [device].
cl_double clprobdistNormalDensityWithObject(const clprobdistNormal *dist, cl_double x, clprobdistStatus *err)
Probability density function [device].
cl_double clprobdistNormalMeanWithObject(const clprobdistNormal *dist, clprobdistStatus *err)
Mean of the distribution [device].
cl_double clprobdistStdNormalInverseCDF(cl_double u, clprobdistStatus *err)
Inverse cumulative density function [device].
clprobdistNormal * clprobdistNormalCreate(cl_double mu, cl_double sigma, size_t *bufSize, clprobdistStatus *err)
Create a distribution object.
cl_double clprobdistNormalInverseCDFWithObject(const clprobdistNormal *dist, cl_double u, clprobdistStatus *err)
Inverse cumulative density function [device].
cl_double clprobdistStdNormalCDF(cl_double x, clprobdistStatus *err)
Cumulative density function [device].
cl_double clprobdistStdNormalDensity(cl_double x, clprobdistStatus *err)
Probability density function [device].
cl_double clprobdistNormalStdDeviationWithObject(const clprobdistNormal *dist, clprobdistStatus *err)
Standard deviation of the distribution [device].