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

« back to all changes in this revision

Viewing changes to lib/src/Uncertainty/Algorithm/MetaModel/MetaModelAlgorithm.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  MetaModelAlgorithm.cxx
4
4
 *  @brief Interface for regression methods
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
38
38
      MetaModelAlgorithm::MetaModelAlgorithm(const NumericalSample & dataIn,
39
39
                                             const NumericalMathFunction & inputFunction,
40
40
                                             const String & name)
41
 
        throw(InvalidArgumentException):
42
 
        PersistentObject(name),
43
 
        dataIn_(dataIn),
44
 
        dataOut_(NumericalSample(0, inputFunction.getOutputNumericalPointDimension())),
45
 
        inputFunction_(inputFunction)
 
41
      /* throw(InvalidArgumentException) */
 
42
        : PersistentObject(name),
 
43
          dataIn_(dataIn),
 
44
          dataOut_(NumericalSample(0, inputFunction.getOutputDimension())),
 
45
          inputFunction_(inputFunction)
46
46
      {
47
47
        if (!inputFunction.getEvaluationImplementation()->isActualImplementation()) throw InvalidArgumentException(HERE) << "Error: the given function must have an actual implementation";
48
 
        if (inputFunction.getInputNumericalPointDimension() != dataIn.getDimension()) throw InvalidArgumentException(HERE) << "Error: the input data dimension and the input dimension of the function must be the same, here input dimension=" << dataIn.getDimension() << " and input dimension of the function=" << inputFunction.getInputNumericalPointDimension();
 
48
        if (inputFunction.getInputDimension() != dataIn.getDimension()) throw InvalidArgumentException(HERE) << "Error: the input data dimension and the input dimension of the function must be the same, here input dimension=" << dataIn.getDimension() << " and input dimension of the function=" << inputFunction.getInputDimension();
49
49
      }
50
50
 
51
51
      /* Constructor with parameters */
52
52
      MetaModelAlgorithm::MetaModelAlgorithm(const NumericalSample & dataIn,
53
53
                                             const NumericalSample & dataOut,
54
54
                                             const String & name)
55
 
        throw(InvalidArgumentException):
56
 
        PersistentObject(name),
57
 
        dataIn_(dataIn),
58
 
        dataOut_(NumericalSample(0, dataOut.getDimension())),
59
 
        inputFunction_(NumericalMathFunction())
 
55
      /* throw(InvalidArgumentException) */
 
56
        : PersistentObject(name),
 
57
          dataIn_(dataIn),
 
58
          dataOut_(NumericalSample(0, dataOut.getDimension())),
 
59
          inputFunction_(NumericalMathFunction())
60
60
      {
61
61
        setDataOut(dataOut);
62
62
      }
96
96
      }
97
97
 
98
98
      void MetaModelAlgorithm::setDataOut(const NumericalSample & dataOut)
99
 
        throw(InvalidArgumentException)
 
99
        /* throw(InvalidArgumentException) */
100
100
      {
101
101
        if (inputFunction_.getEvaluationImplementation()->isActualImplementation()) throw InvalidArgumentException(HERE) << "Error: cannot set the output data in a response surface defined with a function, here function=" << inputFunction_;
102
102
        if (dataOut.getSize() != dataIn_.getSize()) throw InvalidArgumentException(HERE) << "Error: the output data must have the same size than the input data, here output size=" << dataOut.getSize() << " and input size=" << dataIn_.getSize();