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

A one dimensional sin(x)/x. More...

#include <SincFunction.h>

Inheritance diagram for casa::SincFunction< T >:
casa::SincParam< T > casa::Function< T > casa::Functional< FunctionTraits< T >::ArgType, T > casa::Functional< Vector< FunctionTraits< T >::ArgType >, T >

List of all members.

Public Member Functions

 SincFunction ()
 Constructs the SincFunction, Defaults: height=1, center=0, width=1.
 SincFunction (const T &height)
 SincFunction (const T &height, const T &center)
 SincFunction (const T &height, const T &center, const T &width)
 SincFunction (const SincFunction< T > &other)
 Copy constructor (deep copy)
template<class W >
 SincFunction (const SincFunction< W > &other)
SincFunction< T > & operator= (const SincFunction< T > &other)
 Copy assignment (deep copy)
virtual ~SincFunction ()
 Destructor.
virtual T eval (typename Function< T >::FunctionArg x) const
 Evaluate the Sinc 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::SincFunction< T >

A one dimensional sin(x)/x.

Intended use:

Public interface

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25
Test programs:
tFunctionHolder

Prerequisite

Etymology

A 1-dimensional sinc function.

Synopsis

A Sinc is described by a height, a center and a width (halfwidth). The value is:

         let y = (x-center)/width
         height                              (x == center)
         height*sin(pi*y)/(pi*y)             (x |= center)

The parameters are enumerated by HEIGHT, CENTER and WIDTH. They have default values of (1, 0, 1).

Example

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

Template Type Argument Requirements (T)

Thrown Exceptions

Definition at line 86 of file SincFunction.h.


Constructor & Destructor Documentation

template<class T>
casa::SincFunction< T >::SincFunction ( ) [inline]

Constructs the SincFunction, 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 SincFunction.h.

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

Definition at line 96 of file SincFunction.h.

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

Definition at line 98 of file SincFunction.h.

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

Definition at line 100 of file SincFunction.h.

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

Copy constructor (deep copy)

Definition at line 106 of file SincFunction.h.

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

Definition at line 108 of file SincFunction.h.

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

Destructor.

Definition at line 116 of file SincFunction.h.


Member Function Documentation

template<class T>
virtual Function<T>* casa::SincFunction< 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 129 of file SincFunction.h.

template<class T>
virtual Function<typename FunctionTraits<T>::DiffType>* casa::SincFunction< T >::cloneAD ( ) const [inline, virtual]

Reimplemented from casa::Function< T >.

Definition at line 130 of file SincFunction.h.

template<class T>
virtual Function<typename FunctionTraits<T>::BaseType>* casa::SincFunction< T >::cloneNonAD ( ) const [inline, virtual]

Reimplemented from casa::Function< T >.

Definition at line 132 of file SincFunction.h.

template<class T>
virtual T casa::SincFunction< T >::eval ( typename Function< T >::FunctionArg  x) const [virtual]

Evaluate the Sinc at x.

If a vector is used as the argument only its first element is used.

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

Copy assignment (deep copy)

Definition at line 112 of file SincFunction.h.


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