5
5
* form a numerical math evaluation implementation by using centered
6
6
* finite difference formula.
8
* (C) Copyright 2005-2007 EDF-EADS-Phimeca
8
* (C) Copyright 2005-2010 EDF-EADS-Phimeca
10
10
* This library is free software; you can redistribute it and/or
11
11
* modify it under the terms of the GNU Lesser General Public
22
22
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24
24
* @author: $LastChangedBy: dutka $
25
* @date: $LastChangedDate: 2009-05-28 14:47:53 +0200 (jeu. 28 mai 2009) $
26
* Id: $Id: CenteredFiniteDifferenceGradient.hxx 1262 2009-05-28 12:47:53Z dutka $
25
* @date: $LastChangedDate: 2010-02-04 16:44:49 +0100 (jeu. 04 févr. 2010) $
26
* Id: $Id: CenteredFiniteDifferenceGradient.hxx 1473 2010-02-04 15:44:49Z dutka $
28
28
#ifndef OPENTURNS_CENTEREDFINITEDIFFERENCEGRADIENT_HXX
29
29
#define OPENTURNS_CENTEREDFINITEDIFFERENCEGRADIENT_HXX
74
76
/** Parameter constructor */
75
77
CenteredFiniteDifferenceGradient(const NumericalPoint & epsilon,
76
78
const EvaluationImplementation & p_evaluation)
77
throw(InvalidDimensionException);
79
/* throw(InvalidDimensionException) */;
79
81
/** Second parameter constructor */
80
82
CenteredFiniteDifferenceGradient(const NumericalScalar epsilon,
81
83
const EvaluationImplementation & p_evaluation)
82
throw(InvalidDimensionException);
84
/* throw(InvalidDimensionException) */;
84
/** Virtual constructor */
86
/* Virtual constructor */
85
87
virtual CenteredFiniteDifferenceGradient * clone() const;
87
/** Comparison operator */
89
/* Comparison operator */
88
90
Bool operator ==(const CenteredFiniteDifferenceGradient & other) const;
90
/** String converter */
92
/* String converter */
91
93
virtual String __repr__() const;
95
97
/* Here is the interface that all derived class must implement */
99
/** This method computes the gradient at some point
100
* @param in The point where the gradient is computed
101
* @result A matrix constructed with the dF_i/dx_j values (Jacobian transposed)
98
103
virtual Matrix gradient(const NumericalPoint & in) const
99
throw(InvalidArgumentException, InternalException);
101
/** Accessor for input point dimension */
102
virtual UnsignedLong getInputNumericalPointDimension() const
103
throw(InternalException);
105
/** Accessor for output point dimension */
106
virtual UnsignedLong getOutputNumericalPointDimension() const
107
throw(InternalException);
104
/* throw(InvalidArgumentException, InternalException) */;
106
/** Accessor for input point dimension
107
* @return The size of the point passed to the gradient method
109
virtual UnsignedLong getInputDimension() const
110
/* throw(InternalException) */;
112
/** Accessor for output point dimension
113
* @return The size of the point returned by the function whose gradient is computed
115
virtual UnsignedLong getOutputDimension() const
116
/* throw(InternalException) */;
109
118
/** Accessor for the epsilon */
110
119
NumericalPoint getEpsilon() const;
112
121
/** Accessor for the evaluation */
113
122
EvaluationImplementation getEvaluation() const;
115
/** Method save() stores the object through the StorageManager */
116
void save(const StorageManager::Advocate & adv) const;
124
/* Method save() stores the object through the StorageManager */
125
void save(StorageManager::Advocate & adv) const;
118
/** Method load() reloads the object from the StorageManager */
119
void load(const StorageManager::Advocate & adv);
127
/* Method load() reloads the object from the StorageManager */
128
void load(StorageManager::Advocate & adv);