20
20
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22
22
* @author: $LastChangedBy: dutka $
23
* @date: $LastChangedDate: 2008-06-26 13:50:17 +0200 (jeu, 26 jun 2008) $
24
* Id: $Id: Distribution.cxx 862 2008-06-26 11:50:17Z dutka $
23
* @date: $LastChangedDate: 2008-09-13 22:37:56 +0200 (sam 13 sep 2008) $
24
* Id: $Id: Distribution.cxx 929 2008-09-13 20:37:56Z dutka $
26
26
#include "Distribution.hxx"
27
27
#include "Normal.hxx"
177
177
/* Get the CDF of the distribution */
178
NumericalScalar Distribution::computeCDF(const NumericalPoint & point) const
178
NumericalScalar Distribution::computeCDF(const NumericalPoint & point, const Bool tail) const
180
return getImplementation()->computeCDF(point);
180
return getImplementation()->computeCDF(point, tail);
183
183
/* Get the characteristic function of the distribution, i.e. phi(u) = E(exp(I*u*X)) */
202
202
/* Get the CDF of the distribution (for a sample) */
203
Distribution::NumericalSample Distribution::computeCDF(const NumericalSample & sample) const
203
Distribution::NumericalSample Distribution::computeCDF(const NumericalSample & sample, const Bool tail) const
205
return getImplementation()->computeCDF(sample);
205
return getImplementation()->computeCDF(sample, tail);
208
208
/* Get the DDF of the distribution (for a scalar) */
220
220
/* Get the CDF of the distribution (for a scalar) */
221
NumericalScalar Distribution::computeCDF(const NumericalScalar scalar) const
221
NumericalScalar Distribution::computeCDF(const NumericalScalar scalar, const Bool tail) const
223
return getImplementation()->computeCDF(scalar);
223
return getImplementation()->computeCDF(scalar, tail);
226
226
/* Get the probability content of an interval */
246
/* Get the mathematical and numerical range of the distribution.
247
Its mathematical range is the smallest closed interval outside
248
of which the PDF is zero, and the numerical range is the interval
249
outside of which the PDF is rounded to zero in double precision */
250
Distribution::Interval Distribution::getRange() const
252
return getImplementation()->getRange();
255
void Distribution::setRange(const Interval & range)
257
getImplementation()->setRange(range);
247
260
/* Get the quantile of the distribution */
248
261
Distribution::NumericalPoint Distribution::computeQuantile(const NumericalScalar prob) const
274
287
return getImplementation()->getCopula();
290
/* Compute the DDF of Xi | X1, ..., Xi-1. x = Xi, y = (X1,...,Xi-1) */
291
NumericalScalar Distribution::computeConditionalDDF(const NumericalScalar x, const NumericalPoint & y) const
293
return getImplementation()->computeConditionalDDF(x, y);
296
/* Compute the PDF of Xi | X1, ..., Xi-1. x = Xi, y = (X1,...,Xi-1) */
297
NumericalScalar Distribution::computeConditionalPDF(const NumericalScalar x, const NumericalPoint & y) const
299
return getImplementation()->computeConditionalPDF(x, y);
302
/* Compute the CDF of Xi | X1, ..., Xi-1. x = Xi, y = (X1,...,Xi-1) */
303
NumericalScalar Distribution::computeConditionalCDF(const NumericalScalar x, const NumericalPoint & y) const
305
return getImplementation()->computeConditionalCDF(x, y);
308
/* Compute the quantile of Xi | X1, ..., Xi-1, i.e. x such that CDF(x|y) = q with x = Xi, y = (X1,...,Xi-1) */
309
NumericalScalar Distribution::computeConditionalQuantile(const NumericalScalar q, const NumericalPoint & y) const
311
return getImplementation()->computeConditionalQuantile(q, y);
277
314
/* Get the isoprobabilist transformation */
278
315
Distribution::IsoProbabilisticTransformation Distribution::getIsoProbabilisticTransformation() const