Loading...
Searching...
No Matches
casacore::Function1D< T, U > Class Template Reference
scimath package (libcasa_scimath) » Functionals_module

More...

`#include <Function1D.h>`

## Public Types

typedef const T * | FunctionArg
Public Types inherited from casacore::Function< T, T >
typedef FunctionTraits< T >::ArgType | ArgType
typedef const ArgType * | FunctionArg

## Public Member Functions

| Function1D ()
| Constructors.
| Function1D (const uInt n)
| Function1D (const Vector< T > &in)
| Function1D (const FunctionParam< T > &other)
template<class W, class X>
| Function1D (const Function1D< W, X > &other)
virtual | ~Function1D ()
| Destructor.
virtual uInt | ndim () const
| Returns the number of dimensions of function.
Public Member Functions inherited from casacore::Function< T, T >
| Function ()
| Constructors.
virtual | ~Function ()
| Destructor.
uInt | nparameters () const
| Returns the number of parameters.
virtual T | eval (FunctionArg x) const=0
| Evaluate the function object.
T & | operator[] (const uInt n)
| Manipulate the nth parameter (0-based) with no index check.
virtual T | operator() () const
| Evaluate this function object at xor at x, y.
virtual const String & | name () const
| Specify the name associated with the function (default will be unknown).
Bool & | mask (const uInt n)
| Manipulate the mask associated with the nth parameter (e.g.
const FunctionParam< T > & | parameters () const
| Return the parameter interface.
const Vector< ArgType > & | argp () const
| Get arg_p and parset_p.
Bool | parsetp () const
void | lockParam ()
| Compiler cannot always find the correct 'const' version of parameter access.
void | unlockParam ()
virtual void | setMode (const RecordInterface &mode)
| get/set the function mode.
virtual void | getMode (RecordInterface &mode) const
virtual Bool | hasMode () const
| return True if the implementing function supports a mode.
ostream & | print (ostream &os) const
| Print the function (i.e.
virtual Function< T, T > * | clone () const=0
| Return a copy of this object from the heap.
virtual Function< typename FunctionTraits< T >::DiffType > * | cloneAD () const
virtual Function< typename FunctionTraits< T >::BaseType > * | cloneNonAD () const
Public Member Functions inherited from casacore::Functional< FunctionTraits< T >::ArgType, T >
virtual | ~Functional ()
| Destructor.
virtual T | operator() (const FunctionTraits< T >::ArgType &x) const=0
| Map a Domain x into a Range y value.
Public Member Functions inherited from casacore::Functional< Vector< FunctionTraits< T >::ArgType >, T >
virtual | ~Functional ()
| Destructor.
virtual T | operator() (const Vector< FunctionTraits< T >::ArgType > &x) const=0
| Map a Domain x into a Range y value.

## Additional Inherited Members

Protected Attributes inherited from casacore::Function< T, T >
FunctionParam< T > | param_p
| The parameters and masks.
Vector< ArgType > | arg_p
| Aid for non-contiguous argument storage.
Bool | parset_p
| Indicate parameter written.
Bool | locked_p
| Indicate that parameters are expected to be locked from changing.

## Detailed Description

template<class T, class U = T>
class casacore::Function1D< T, U >

Numerical functional interface class for 1 dimension

### Intended use:

Public interface

### Review Status

Reviewed By:
  tcornwel
Date Reviewed:
  1996/02/22
Test programs:
  tGaussian1D

### Prerequisite

- Function

### Synopsis

A Function1D is used for classes which map a scalar or n-dimensional Vector of type T into a T. The object also has one parameter which can be masked if necessary, and be used in the Fitting module, and, implicitly, in the AutoDiff differentiation module.

The only method implemented in Function1D is the ndim() method. The rest is inhereted from Function.

### Example

See Function.

### Template Type Argument Requirements (T)

- Besides the requirements set by the Functional base class, it must be possible to form a Vector<T>.

Definition at line 73 of file Function1D.h.

## Member Typedef Documentation

## FunctionArg

template<class T, class U = T>

typedef const T* casacore::Function1D< T, U >::FunctionArg

Definition at line 76 of file Function1D.h.

## Constructor & Destructor Documentation

## Function1D() [1/5]

template<class T, class U = T>

casacore::Function1D< T, U >::Function1D | ( |  | ) |

inline

Constructors.

Definition at line 81 of file Function1D.h.

References casacore::Function< T, T >::Function().

Referenced by casacore::ChebyshevParam< T >::ChebyshevParam(), casacore::EvenPolynomialParam< T >::EvenPolynomialParam(), Function1D(), casacore::Gaussian1DParam< T >::Gaussian1DParam(), casacore::Lorentzian1DParam< T >::Lorentzian1DParam(), casacore::OddPolynomialParam< T >::OddPolynomialParam(), casacore::PowerLogarithmicPolynomialParam< T >::PowerLogarithmicPolynomialParam(), casacore::EvenPolynomialParam< T >::setCoefficients(), casacore::OddPolynomialParam< T >::setCoefficients(), casacore::PowerLogarithmicPolynomialParam< T >::setCoefficients(), and casacore::Sinusoid1DParam< T >::Sinusoid1DParam().

## Function1D() [2/5]

template<class T, class U = T>

casacore::Function1D< T, U >::Function1D | ( | const uInt | n | ) |

inline explicit

Definition at line 82 of file Function1D.h.

References casacore::Function< T, T >::Function().

## Function1D() [3/5]

template<class T, class U = T>

casacore::Function1D< T, U >::Function1D | ( | const Vector< T > & | in | ) |

inline explicit

Definition at line 83 of file Function1D.h.

References casacore::Function< T, T >::Function().

## Function1D() [4/5]

template<class T, class U = T>

casacore::Function1D< T, U >::Function1D | ( | const FunctionParam< T > & | other | ) |

inline

Definition at line 84 of file Function1D.h.

References casacore::Function< T, T >::Function().

## Function1D() [5/5]

template<class T, class U = T>
template<class W, class X>

casacore::Function1D< T, U >::Function1D | ( | const Function1D< W, X > & | other | ) |

inline

Definition at line 86 of file Function1D.h.

References casacore::Function< T, T >::Function(), and Function1D().

## ~Function1D()

template<class T, class U = T>

virtual casacore::Function1D< T, U >::~Function1D | ( |  | ) |

inline virtual

Destructor.

Definition at line 90 of file Function1D.h.

## Member Function Documentation

## ndim()

template<class T, class U = T>

virtual uInt casacore::Function1D< T, U >::ndim | ( |  | ) | const

inline virtual

Returns the number of dimensions of function.

Implements casacore::Function< T, T >.

Definition at line 93 of file Function1D.h.

The documentation for this class was generated from the following file:

- scimath/Functionals/Function1D.h