C++ wrapper to Fred Schwab function to calculate spheriodal functions.
- UNARY
- GAUSSIAN
- KB
- MOD_KB
- SINC
- SPHEROIDAL
- EXP_SINC
The following enum documentation is currently extracted by hand, and thus could be out of date if this documentation was not updated when the enum was modified.
The FUNCTYPE enum is:
enum FUNCTYPE { UNARY, GAUSSIAN, KB, MOD_KB, SINC, SPHEROIDAL, EXP_SINC };
This class is the abstract base class for 1-dimensional math functions.
Actual math functions are then an inherited class from the base class. This approach allows one to define actual function values for each derived class. Then, one can pass a generic MathFunc pointer to other objects, but the other objects will still get function values from the actual inherited function.
By defining each math function as an object, we can place parameters which will not change from one call to the function value to another in the class definition and they only have to be initialized once.
MathFunc is the base class for 1-dimensional math functions
constructors
Destructor
Assignment operator - Note: this function works only for envelops. Polymorphism flaws will let you pass a letter as an argument but an exception will be thrown at run time.
return value of support width
compute and return a value of the math function
create a new math function
return a FuncId structure for Table storage/retrieval.
These functions return the static constants used as default parameters for the various derived functions
The default support radius
The default width for Gaussian_Conv
The default width for KB_Conv and Mod_KB_Conv
A default parameter for KB_Conv and Mod_KB_Conv
A default parameter for Mod_KB_Conv
The default support radius for Sinc_Conv and Sph_Conv
The default Sinc parameter for Sinc_Conv and Exp_Sinc_Conv
The default parameter for Sph_Conv
The default exponential power for Exp_Sinc_Conv
The default exponential scale length for Exp_Sinc_Conv
for every derived class, return new of that class with its own parameters
Default constructor (Null)
default constructor
copy constructor
return a FuncId structure for Table storage/retrieval.
default constructor
copy constructor
return a FuncId structure for Table storage/retrieval.
copy constructor
return a FuncId structure for Table storage/retrieval.
copy constructor
return a FuncId structure for Table storage/retrieval.
return a FuncId structure for Table storage/retrieval.
return a FuncId structure for Table storage/retrieval.
The value(T &x) is given by
Exp(-(abs(x) / expscale) ** exppow) * Sinc( pi * x / sincparm)
where the 3 paramaters correspond to those in the default constructor
Note that the default case of exppow = 2 is
a Gaussian times a Sinc.
Since this is often a useful case, that parameter appears last in the
constructor.
default constructor
assignment operator
get access to the support width
and get the value of the function
return FuncID structure for Table storage/retrieval.
Synopsis
A Gaussian
Member Description
GaussianConv( T cut = cut<T>::defcutoff(), T wparm = cut<T>::defwidth())
GaussianConv(const GaussianConv<T>&)
GaussianConv<T>& operator=(const GaussianConv<T>&)
T sup_value() const
T value(const T &) const
FuncId id() const
MathFunc<T> * clone() const
class KB_Conv: public MathFunc<T>
Interface
Description
Synopsis
A Kaiser-Bessel function
Member Description
KB_Conv(T cut = cut<T>::defcutoff(), T wparm = cut<T>::defKBwidth(), T kbparm = cut<T>::defKBparm())
default constructor
KB_Conv(const KB_Conv<T> &)
KB_Conv<T>& operator=(const KB_Conv<T>&)
T sup_value() const
T value(const T &) const
FuncId id() const
MathFunc<T> * clone() const
class Mod_KB_Conv: public MathFunc<T>
Interface
Description
Synopsis
A Kaiser-Bessel function multiplied by a Gaussian
Member Description
Mod_KB_Conv (T cut = cut<T>::defcutoff(), T wparm = cut<T>::defKBwidth(), T kbparm = cut<T>::defKBparm(), T gwparm = cut<T>::defmodKBparm())
default constructor
Mod_KB_Conv(const Mod_KB_Conv<T>&)
Mod_KB_Conv<T>& operator=(const Mod_KB_Conv<T>&)
T sup_value() const
T value(const T &) const
FuncId id() const
MathFunc<T>* clone() const
class Sinc_Conv: public MathFunc<T>
Interface
Description
Synopsis
Sine x / x function
Member Description
Sinc_Conv(T cut = cut<T>::defSphcutoff(), T sincparm = cut<T>::defSincparm())
default constructor
Sinc_Conv(const Sinc_Conv<T>&)
copy constructor
Sinc_Conv<T>& operator=(const Sinc_Conv<T>&)
T sup_value() const
T value(const T &) const
FuncId id() const
MathFunc<T> * clone() const
class Sph_Conv: public MathFunc<T>
Interface
Description
Synopsis
Spheroidal function - calls Fred Schwab function converted by f2c
Member Description
Sph_Conv(T cut = cut<T>::defSphcutoff(), T Sphparm = cut<T>::defSphparm())
default constructor
Sph_Conv(const Sph_Conv<T>&)
copy constructor
Sph_Conv<T>& operator=(const Sph_Conv<T>&)
T sup_value() const
float value(const float &) const
FuncId id() const
MathFunc<T> * clone() const
class ExpSincConv: public MathFunc<T>
Interface
Description
Synopsis
An Exponential times a Sinc
Member Description
ExpSincConv ( T cut = cut<T>::defcutoff(), T sincparm = cut<T>::defSincparm(), T exppow = cut<T>::defExpPower(), T expscale = cut<T>::defExpScale())
ExpSincConv (const ExpSincConv<T>&)
copy constructor
ExpSincConv<T>& operator=(const ExpSincConv<T>&)
T sup_value() const
T value(const T &) const
FuncId id() const
MathFunc<T> * clone() const