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

« back to all changes in this revision

Viewing changes to lib/src/Uncertainty/Distribution/WeibullFactory.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  WeibullFactory.cxx
4
4
 *  @brief Factory for Weibull 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: WeibullFactory.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: WeibullFactory.cxx 1473 2010-02-04 15:44:49Z dutka $
25
25
 */
26
26
#include "WeibullFactory.hxx"
27
27
#include "Weibull.hxx"
35
35
      typedef Model::DistributionImplementationFactory::NumericalPoint NumericalPoint;
36
36
 
37
37
      /* Default constructor */
38
 
      WeibullFactory::WeibullFactory()
 
38
      WeibullFactory::WeibullFactory():
 
39
        DistributionImplementationFactory()
39
40
      {
40
 
        // Initialize any other class members here
41
 
        // At last, allocate memory space if needed, but go to destructor to free it
 
41
        // Nothing to do
42
42
      }
43
43
 
44
44
      /* Virtual constructor */
49
49
 
50
50
      /* Here is the interface that all derived class must implement */
51
51
 
52
 
      WeibullFactory::DistributionImplementation * WeibullFactory::buildImplementation(const NumericalSample & sample) const throw(InvalidArgumentException, InternalException)
 
52
      WeibullFactory::DistributionImplementation * WeibullFactory::buildImplementation(const NumericalSample & sample) const /* throw(InvalidArgumentException, InternalException) */
53
53
      {
54
54
        if (sample.getSize() == 0) throw InvalidArgumentException(HERE) << "Error: cannot build a Weibull distribution from an empty sample";
55
55
        if (sample.getDimension() != 1) throw InvalidArgumentException(HERE) << "Error: can build a Weibull distribution only from a sample of dimension 1, here dimension=" << sample.getDimension();
75
75
          }
76
76
      }
77
77
 
78
 
      WeibullFactory::DistributionImplementation * WeibullFactory::buildImplementation(const NumericalPointCollection & parameters) const throw(InvalidArgumentException, InternalException)
 
78
      WeibullFactory::DistributionImplementation * WeibullFactory::buildImplementation(const NumericalPointCollection & parameters) const /* throw(InvalidArgumentException, InternalException) */
79
79
      {
80
80
        try {
81
81
          Weibull distribution;
88
88
          }
89
89
      }
90
90
 
91
 
      WeibullFactory::DistributionImplementation * WeibullFactory::buildImplementation() const throw(InvalidArgumentException, InternalException)
 
91
      WeibullFactory::DistributionImplementation * WeibullFactory::buildImplementation() const /* throw(InvalidArgumentException, InternalException) */
92
92
      {
93
93
        return Weibull().clone();
94
94
      }