casa
$Rev:20696$
|
Parameter handling for a constant function in a space of arbitrary dimensionality. More...
#include <ConstantNDParam.h>
Public Member Functions | |
ConstantNDParam (uInt m=0) | |
Construct a constant in m-dimensional space. | |
ConstantNDParam (const ConstantNDParam &other) | |
Copy constructor (deep copy) | |
template<class W > | |
ConstantNDParam (const ConstantNDParam< W > &other) | |
ConstantNDParam< T > & | operator= (const ConstantNDParam< T > &other) |
Copy assignment (deep copy) | |
virtual | ~ConstantNDParam () |
Destructor. | |
Bool | operator== (const ConstantNDParam< T > &other) const |
Comparisons. | |
Bool | operator!= (const ConstantNDParam< T > &other) const |
virtual const String & | name () const |
Give name of function. | |
virtual uInt | ndim () const |
What is the dimension of the parameter list. | |
Private Attributes | |
uInt | _ndim |
Parameter handling for a constant function in a space of arbitrary dimensionality.
Internal
This class forms a function of the form f(x0,x1,..,xm-1) = constant in an m-dimensional parameter space where xi are independent arguments.
Since the Constant
is a Function
, the derivatives can be obtained as well (and in fact are 0 of course).
The parameter interface (see FunctionParam class), is used to provide an interface to the Fitting classes.
This class is in general used implicitly by the Constant
class only.
form a constant function in 4-D space Constant<Double> constant(4); // constant in 4-D param space constant.parameters()[0] = 22; // Evaluate at x0=5, x3=7 Vector<Double> x(4); x=0; x[0]=5; x[3]=7; cout << "constant value: " << constant(x) << endl; constant value: 22
This class was created because HyperPlane does not support a constant offset and modifying that class really required an interface change (ie that the constant offset be at the beginning of the parameter vector and that the parameter vector increase by one) so rather than breaking any code that already used HyperPlane I simply made a trivial Constant class.
Definition at line 105 of file ConstantNDParam.h.
casa::ConstantNDParam< T >::ConstantNDParam | ( | uInt | m = 0 | ) | [explicit] |
Construct a constant in m-dimensional space.
By default, the constant value is initialized to zero.
casa::ConstantNDParam< T >::ConstantNDParam | ( | const ConstantNDParam< T > & | other | ) |
Copy constructor (deep copy)
casa::ConstantNDParam< T >::ConstantNDParam | ( | const ConstantNDParam< W > & | other | ) | [inline] |
Definition at line 119 of file ConstantNDParam.h.
virtual casa::ConstantNDParam< T >::~ConstantNDParam | ( | ) | [virtual] |
Destructor.
virtual const String& casa::ConstantNDParam< T >::name | ( | ) | const [inline, virtual] |
Give name of function.
Reimplemented from casa::Function< T >.
Definition at line 142 of file ConstantNDParam.h.
virtual uInt casa::ConstantNDParam< T >::ndim | ( | ) | const [inline, virtual] |
What is the dimension of the parameter list.
Implements casa::Function< T >.
Definition at line 146 of file ConstantNDParam.h.
Bool casa::ConstantNDParam< T >::operator!= | ( | const ConstantNDParam< T > & | other | ) | const [inline] |
Definition at line 136 of file ConstantNDParam.h.
ConstantNDParam<T>& casa::ConstantNDParam< T >::operator= | ( | const ConstantNDParam< T > & | other | ) |
Copy assignment (deep copy)
Bool casa::ConstantNDParam< T >::operator== | ( | const ConstantNDParam< T > & | other | ) | const [inline] |
Comparisons.
HyperPlanes are equal if they are of the same order and have the same parameters
Definition at line 134 of file ConstantNDParam.h.
uInt casa::ConstantNDParam< T >::_ndim [private] |
Definition at line 154 of file ConstantNDParam.h.
Referenced by casa::ConstantNDParam< AutoDiff< T > >::ndim().