casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Static Public Attributes | Static Private Attributes
casa::MarshallableChebyshev< T > Class Template Reference

A Chebyshev function class that supports serialization. More...

#include <MarshallableChebyshev.h>

Inheritance diagram for casa::MarshallableChebyshev< T >:
casa::Chebyshev< T > casa::FunctionMarshallable casa::ChebyshevParamModeImpl< T > casa::ChebyshevParam< T > casa::Function1D< T > casa::Function< T, T > casa::Functional< FunctionTraits< T >::ArgType, T > casa::Functional< Vector< FunctionTraits< T >::ArgType >, T >

List of all members.

Public Types

enum  FieldNames {
  COEFFS,
  MODE,
  DEF,
  INTERVAL,
  NFieldNames
}
 definitions of the fields stored in a serialized Record. More...

Public Member Functions

 MarshallableChebyshev ()
 create a zero-th order Chebyshev polynomial with the first coefficient equal to zero.
 MarshallableChebyshev (const uInt n)
 create an n-th order Chebyshev polynomial with the coefficients equal to zero.
 MarshallableChebyshev (const T &min, const T &max, const typename ChebyshevEnums::OutOfIntervalMode mode=ChebyshevEnums::CONSTANT, const T &defval=T(0))
 create a zero-th order Chebyshev polynomical with the first coefficient equal to one.
 MarshallableChebyshev (const Vector< T > &coeffs, const T &min, const T &max, const typename ChebyshevEnums::OutOfIntervalMode mode=ChebyshevEnums::CONSTANT, const T &defval=T(0))
 create a fully specified Chebyshev polynomial.
 MarshallableChebyshev (const Record &gr) throw (InvalidSerializationError)
 create a fully specified Chebyshev polynomial from parameters stored in a Record.
 MarshallableChebyshev (const Chebyshev< T > &other)
 create a deep copy of another Chebyshev polynomial
 MarshallableChebyshev (const MarshallableChebyshev< T > &other)
MarshallableChebyshev< T > & operator= (const MarshallableChebyshev< T > &other)
 make a (deep) copy of another Chebyshev polynomial
MarshallableChebyshev< T > & operator= (const Chebyshev< T > &other)
 make this instance a (deep) copy of another Chebyshev polynomial
virtual ~MarshallableChebyshev ()
 Destructor.
virtual void store (Record &gr) const
 store the state of this Function into a Record
virtual Function< T > * clone () const
 Create a copy of this object.

Static Public Attributes

static const String FUNCTYPE
static const String FUNCFIELDS []

Static Private Attributes

static const String modenames []

Detailed Description

template<class T>
class casa::MarshallableChebyshev< T >

A Chebyshev function class that supports serialization.

Intended use:

Public interface

Review Status

Reviewed By:
wbrouw
Date Reviewed:
2001/11/12
Test programs:
tChebyshev

Prerequisite

Etymology

This class is named after Chebyshev Type I polynomials. "Marshallable" means that the class can be serialized into a form that can be transmitted to another execution context.

Synopsis

This class is a specialization of the Chebyshev class that supports serialization. That is, it allows one to write the state of the Chebyshev polynomial object into a Record. This record can then be transmitted to another execution context (e.g. or another AIPS++ DO) where it can be "reconstituted" as a new object with identical state as this one. This documentation focusses on this serialization functionality (also known as "marshalling"); for details about the general features of the Chebyshev polynomial series, see the Chebyshev class.

Example

Motivation

Making Chebyshev Marshallable provides a convenient way of configuring the simulator tool from .

Thrown Exceptions

Definition at line 85 of file MarshallableChebyshev.h.


Member Enumeration Documentation

definitions of the fields stored in a serialized Record.

The actual string names are stored in FUNCFIELDS

Enumerator:
COEFFS 

the array of coefficients

MODE 

the default mode

DEF 

the default value to use when mode=CONSTANT

INTERVAL 

the 2-element double array

NFieldNames 

the number of supported fields

Definition at line 97 of file MarshallableChebyshev.h.


Constructor & Destructor Documentation

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

create a zero-th order Chebyshev polynomial with the first coefficient equal to zero.

The bounded domain is [T(-1), T(1)]. The OutOfDomainMode is CONSTANT, and the default value is T(0).

Definition at line 114 of file MarshallableChebyshev.h.

template<class T>
casa::MarshallableChebyshev< T >::MarshallableChebyshev ( const uInt  n) [inline, explicit]

create an n-th order Chebyshev polynomial with the coefficients equal to zero.

The bounded domain is [T(-1), T(1)]. The OutOfDomainMode is CONSTANT, and the default value is T(0).

Definition at line 120 of file MarshallableChebyshev.h.

template<class T>
casa::MarshallableChebyshev< T >::MarshallableChebyshev ( const T &  min,
const T &  max,
const typename ChebyshevEnums::OutOfIntervalMode  mode = ChebyshevEnums::CONSTANT,
const T &  defval = T(0) 
) [inline]

create a zero-th order Chebyshev polynomical with the first coefficient equal to one.

min is the minimum value of its Chebyshev interval, and max is the maximum value. mode sets the behavior of the function outside the Chebyshev interval (see setOutOfIntervalMode() and OutOfIntervalMode enumeration definition for details). defval is the value returned when the function is evaluated outside the Chebyshev interval and mode=CONSTANT.

Definition at line 132 of file MarshallableChebyshev.h.

template<class T>
casa::MarshallableChebyshev< T >::MarshallableChebyshev ( const Vector< T > &  coeffs,
const T &  min,
const T &  max,
const typename ChebyshevEnums::OutOfIntervalMode  mode = ChebyshevEnums::CONSTANT,
const T &  defval = T(0) 
) [inline]

create a fully specified Chebyshev polynomial.

coeffs holds the coefficients of the Chebyshev polynomial (see setCoefficients() for details). min is the minimum value of its canonical range, and max is the maximum value. mode sets the behavior of the function outside the Chebyshev interval (see setOutOfIntervalMode() and OutOfIntervalMode enumeration definition for details). defval is the value returned when the function is evaluated outside the canonical range and mode=CONSTANT.

Definition at line 149 of file MarshallableChebyshev.h.

template<class T>
casa::MarshallableChebyshev< T >::MarshallableChebyshev ( const Record gr) throw (InvalidSerializationError) [explicit]

create a fully specified Chebyshev polynomial from parameters stored in a Record.

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

create a deep copy of another Chebyshev polynomial

Definition at line 165 of file MarshallableChebyshev.h.

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

Definition at line 167 of file MarshallableChebyshev.h.

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

Destructor.

Definition at line 189 of file MarshallableChebyshev.h.


Member Function Documentation

template<class T>
virtual Function<T>* casa::MarshallableChebyshev< T >::clone ( ) const [inline, virtual]

Create a copy of this object.

The caller is responsible for deleting the pointer.

Reimplemented from casa::Chebyshev< T >.

Definition at line 196 of file MarshallableChebyshev.h.

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

make a (deep) copy of another Chebyshev polynomial

Definition at line 173 of file MarshallableChebyshev.h.

Referenced by casa::MarshallableChebyshev< T >::operator=().

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

make this instance a (deep) copy of another Chebyshev polynomial

Reimplemented from casa::Chebyshev< T >.

Definition at line 180 of file MarshallableChebyshev.h.

References casa::MarshallableChebyshev< T >::operator=().

template<class T>
virtual void casa::MarshallableChebyshev< T >::store ( Record gr) const [virtual]

store the state of this Function into a Record

Implements casa::FunctionMarshallable.


Member Data Documentation

template<class T>
const String casa::MarshallableChebyshev< T >::FUNCFIELDS[] [static]

Definition at line 93 of file MarshallableChebyshev.h.

template<class T>
const String casa::MarshallableChebyshev< T >::FUNCTYPE [static]

Definition at line 92 of file MarshallableChebyshev.h.

template<class T>
const String casa::MarshallableChebyshev< T >::modenames[] [static, private]

Definition at line 89 of file MarshallableChebyshev.h.


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