~ubuntu-branches/ubuntu/maverick/openturns/maverick

« back to all changes in this revision

Viewing changes to lib/src/Uncertainty/Model/Distribution.cxx

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme
  • Date: 2008-11-18 06:32:22 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20081118063222-pa0qncclrerrqkg2
Tags: 0.12.2-1
* New upstream release
* Bug fix: "New upstream release available (0.12.2)", thanks to Jerome
  Robert (Closes: #506005).
* Applied patch by J. Robert.
* debian/control: build-depends on libxml2

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
21
21
 *
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 $
25
25
 */
26
26
#include "Distribution.hxx"
27
27
#include "Normal.hxx"
175
175
      }
176
176
 
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
179
179
      {
180
 
        return getImplementation()->computeCDF(point);
 
180
        return getImplementation()->computeCDF(point, tail);
181
181
      }
182
182
 
183
183
      /* Get the characteristic function of the distribution, i.e. phi(u) = E(exp(I*u*X)) */
200
200
      }
201
201
 
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
204
204
      {
205
 
        return getImplementation()->computeCDF(sample);
 
205
        return getImplementation()->computeCDF(sample, tail);
206
206
      }
207
207
 
208
208
      /* Get the DDF of the distribution (for a scalar) */
218
218
      }
219
219
 
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
222
222
      {
223
 
        return getImplementation()->computeCDF(scalar);
 
223
        return getImplementation()->computeCDF(scalar, tail);
224
224
      }
225
225
 
226
226
      /* Get the probability content of an interval */
243
243
 
244
244
 
245
245
 
 
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
 
251
      {
 
252
        return getImplementation()->getRange();
 
253
      }
 
254
 
 
255
      void Distribution::setRange(const Interval & range)
 
256
      {
 
257
        getImplementation()->setRange(range);
 
258
      }
246
259
 
247
260
      /* Get the quantile of the distribution */
248
261
      Distribution::NumericalPoint Distribution::computeQuantile(const NumericalScalar prob) const
274
287
        return getImplementation()->getCopula();
275
288
      }
276
289
 
 
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
 
292
      {
 
293
        return getImplementation()->computeConditionalDDF(x, y);
 
294
      }
 
295
      
 
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
 
298
      {
 
299
        return getImplementation()->computeConditionalPDF(x, y);
 
300
      }
 
301
      
 
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
 
304
      {
 
305
        return getImplementation()->computeConditionalCDF(x, y);
 
306
      }
 
307
      
 
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
 
310
      {
 
311
        return getImplementation()->computeConditionalQuantile(q, y);
 
312
      }
 
313
 
277
314
      /* Get the isoprobabilist transformation */
278
315
      Distribution::IsoProbabilisticTransformation Distribution::getIsoProbabilisticTransformation() const
279
316
      {