casa
$Rev:20696$
|
A one dimensional unary function. More...
#include <UnaryFunction.h>
Public Member Functions | |
UnaryFunction () | |
Constructs the UnaryFunction, Defaults: height=1, center=0, width=1. | |
UnaryFunction (const T &height) | |
UnaryFunction (const T &height, const T ¢er) | |
UnaryFunction (const T &height, const T ¢er, const T &width) | |
UnaryFunction (const UnaryFunction< T > &other) | |
Copy constructor (deep copy) | |
template<class W > | |
UnaryFunction (const UnaryFunction< W > &other) | |
UnaryFunction< T > & | operator= (const UnaryFunction< T > &other) |
Copy assignment (deep copy) | |
virtual | ~UnaryFunction () |
Destructor. | |
virtual T | eval (typename Function< T >::FunctionArg x) const |
Evaluate the Unary at x . | |
virtual Function< T > * | clone () const |
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 |
A one dimensional unary function.
Public interface
A 1-dimensional unary hat.
A Unary
is described by a height, a center and a width (halfwidth). The value is:
height (|x-center| < width) 0.5height (|x-center| == width) 0 (|x-center| > width)
The parameters are enumerated by HEIGHT, CENTER and WIDTH. They have default values of (1, 0, 1).
UnaryFunction<Double> sf(5.0, 25.0, 7);
sf(25); // = 5.0
Definition at line 86 of file UnaryFunction.h.
casa::UnaryFunction< T >::UnaryFunction | ( | ) | [inline] |
Constructs the UnaryFunction, Defaults: height=1, center=0, width=1.
Warning: Could not use default arguments that worked both with gcc and IRIX
Definition at line 95 of file UnaryFunction.h.
casa::UnaryFunction< T >::UnaryFunction | ( | const T & | height | ) | [inline, explicit] |
Definition at line 96 of file UnaryFunction.h.
casa::UnaryFunction< T >::UnaryFunction | ( | const T & | height, |
const T & | center | ||
) | [inline] |
Definition at line 98 of file UnaryFunction.h.
casa::UnaryFunction< T >::UnaryFunction | ( | const T & | height, |
const T & | center, | ||
const T & | width | ||
) | [inline] |
Definition at line 100 of file UnaryFunction.h.
casa::UnaryFunction< T >::UnaryFunction | ( | const UnaryFunction< T > & | other | ) | [inline] |
Copy constructor (deep copy)
Definition at line 106 of file UnaryFunction.h.
casa::UnaryFunction< T >::UnaryFunction | ( | const UnaryFunction< W > & | other | ) | [inline] |
Definition at line 108 of file UnaryFunction.h.
virtual casa::UnaryFunction< T >::~UnaryFunction | ( | ) | [inline, virtual] |
Destructor.
Definition at line 115 of file UnaryFunction.h.
virtual Function<T>* casa::UnaryFunction< T >::clone | ( | ) | const [inline, virtual] |
Return a copy of this object from the heap.
The caller is responsible for deleting this pointer.
Implements casa::Function< T >.
Definition at line 128 of file UnaryFunction.h.
virtual Function<typename FunctionTraits<T>::DiffType>* casa::UnaryFunction< T >::cloneAD | ( | ) | const [inline, virtual] |
Reimplemented from casa::Function< T >.
Definition at line 129 of file UnaryFunction.h.
virtual Function<typename FunctionTraits<T>::BaseType>* casa::UnaryFunction< T >::cloneNonAD | ( | ) | const [inline, virtual] |
Reimplemented from casa::Function< T >.
Definition at line 131 of file UnaryFunction.h.
virtual T casa::UnaryFunction< T >::eval | ( | typename Function< T >::FunctionArg | x | ) | const [virtual] |
Evaluate the Unary at x
.
If a vector is used as the argument only its first element is used.
UnaryFunction<T>& casa::UnaryFunction< T >::operator= | ( | const UnaryFunction< T > & | other | ) | [inline] |
Copy assignment (deep copy)
Definition at line 111 of file UnaryFunction.h.