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

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Fabrice Coutadeur
  • Date: 2010-05-10 17:27:55 UTC
  • mfrom: (1.1.4 upstream) (5.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20100510172755-cb5ynskknqqi5rhp
Tags: 0.13.2-2ubuntu1
* Merge with Debian testing. No changes left.
* ubuntu_fix-python-2.6.patch: fix detection of python 2.6 libs, to not use
  LOCALMODLIBS. This pulls a dependency on SSL and makes the package FTBFS.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 *  @file  ExponentialFactory.cxx
4
4
 *  @brief Factory for Exponential distribution
5
5
 *
6
 
 *  (C) Copyright 2005-2007 EDF-EADS-Phimeca
 
6
 *  (C) Copyright 2005-2010 EDF-EADS-Phimeca
7
7
 *
8
8
 *  This library is free software; you can redistribute it and/or
9
9
 *  modify it under the terms of the GNU Lesser General Public
20
20
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
21
21
 *
22
22
 *  @author: $LastChangedBy: dutka $
23
 
 *  @date:   $LastChangedDate: 2009-05-28 10:54:56 +0200 (jeu. 28 mai 2009) $
24
 
 *  Id:      $Id: ExponentialFactory.cxx 1261 2009-05-28 08:54:56Z dutka $
 
23
 *  @date:   $LastChangedDate: 2010-02-04 16:44:49 +0100 (jeu. 04 févr. 2010) $
 
24
 *  Id:      $Id: ExponentialFactory.cxx 1473 2010-02-04 15:44:49Z dutka $
25
25
 */
26
26
#include "ExponentialFactory.hxx"
27
27
#include "Exponential.hxx"
33
33
    namespace Distribution {
34
34
 
35
35
      /* Default constructor */
36
 
      ExponentialFactory::ExponentialFactory()
 
36
      ExponentialFactory::ExponentialFactory():
 
37
        DistributionImplementationFactory()
37
38
      {
38
 
        // Initialize any other class members here
39
 
        // At last, allocate memory space if needed, but go to destructor to free it
 
39
        // Nothing to do
40
40
      }
41
41
 
42
42
      /* Virtual constructor */
47
47
 
48
48
      /* Here is the interface that all derived class must implement */
49
49
 
50
 
      ExponentialFactory::DistributionImplementation * ExponentialFactory::buildImplementation(const NumericalSample & sample) const throw(InvalidArgumentException, InternalException)
 
50
      ExponentialFactory::DistributionImplementation * ExponentialFactory::buildImplementation(const NumericalSample & sample) const /* throw(InvalidArgumentException, InternalException) */
51
51
      {
52
52
        if (sample.getSize() == 0) throw InvalidArgumentException(HERE) << "Error: cannot build a Exponential distribution from an empty sample";
53
53
        if (sample.getDimension() != 1) throw InvalidArgumentException(HERE) << "Error: can build an Exponential distribution only from a sample of dimension 1, here dimension=" << sample.getDimension();
68
68
        return Exponential(lambda, gamma).clone();
69
69
      }
70
70
 
71
 
      ExponentialFactory::DistributionImplementation * ExponentialFactory::buildImplementation(const NumericalPointCollection & parameters) const throw(InvalidArgumentException, InternalException)
 
71
      ExponentialFactory::DistributionImplementation * ExponentialFactory::buildImplementation(const NumericalPointCollection & parameters) const /* throw(InvalidArgumentException, InternalException) */
72
72
      {
73
73
        try {
74
74
          Exponential distribution;
81
81
          }
82
82
      }
83
83
 
84
 
      ExponentialFactory::DistributionImplementation * ExponentialFactory::buildImplementation() const throw(InvalidArgumentException, InternalException)
 
84
      ExponentialFactory::DistributionImplementation * ExponentialFactory::buildImplementation() const /* throw(InvalidArgumentException, InternalException) */
85
85
      {
86
86
        return Exponential().clone();
87
87
      }