casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
casa::UnaryFunction< T > Class Template Reference

A one dimensional unary function. More...

#include <UnaryFunction.h>

Inheritance diagram for casa::UnaryFunction< T >:
casa::UnaryParam< T > casa::Function< T > casa::Functional< FunctionTraits< T >::ArgType, T > casa::Functional< Vector< FunctionTraits< T >::ArgType >, T >

List of all members.

Public Member Functions

 UnaryFunction ()
 Constructs the UnaryFunction, Defaults: height=1, center=0, width=1.
 UnaryFunction (const T &height)
 UnaryFunction (const T &height, const T &center)
 UnaryFunction (const T &height, const T &center, 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

Detailed Description

template<class T>
class casa::UnaryFunction< T >

A one dimensional unary function.

Intended use:

Public interface

Review Status

Test programs:
tFunctionHolder

Prerequisite

Etymology

A 1-dimensional unary hat.

Synopsis

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).

Example

       UnaryFunction<Double> sf(5.0, 25.0, 7);
       sf(25);            // = 5.0

Template Type Argument Requirements (T)

Thrown Exceptions

Definition at line 86 of file UnaryFunction.h.


Constructor & Destructor Documentation

template<class T>
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.

template<class T>
casa::UnaryFunction< T >::UnaryFunction ( const T &  height) [inline, explicit]

Definition at line 96 of file UnaryFunction.h.

template<class T>
casa::UnaryFunction< T >::UnaryFunction ( const T &  height,
const T &  center 
) [inline]

Definition at line 98 of file UnaryFunction.h.

template<class T>
casa::UnaryFunction< T >::UnaryFunction ( const T &  height,
const T &  center,
const T &  width 
) [inline]

Definition at line 100 of file UnaryFunction.h.

template<class T>
casa::UnaryFunction< T >::UnaryFunction ( const UnaryFunction< T > &  other) [inline]

Copy constructor (deep copy)

Definition at line 106 of file UnaryFunction.h.

template<class T>
template<class W >
casa::UnaryFunction< T >::UnaryFunction ( const UnaryFunction< W > &  other) [inline]

Definition at line 108 of file UnaryFunction.h.

template<class T>
virtual casa::UnaryFunction< T >::~UnaryFunction ( ) [inline, virtual]

Destructor.

Definition at line 115 of file UnaryFunction.h.


Member Function Documentation

template<class T>
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.

template<class T>
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.

template<class T>
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.

template<class T>
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.

template<class T>
UnaryFunction<T>& casa::UnaryFunction< T >::operator= ( const UnaryFunction< T > &  other) [inline]

Copy assignment (deep copy)

Definition at line 111 of file UnaryFunction.h.


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