28 #ifndef SCIMATH_MATHFUNC_H
29 #define SCIMATH_MATHFUNC_H
35 #include <casacore/casa/aips.h>
36 #include <casacore/casa/BasicMath/Math.h>
37 #include <casacore/casa/BasicSL/Constants.h>
38 #include <casacore/casa/Exceptions/Error.h>
39 #include <casacore/casa/Arrays/Vector.h>
40 #include <casacore/casa/BasicSL/String.h>
114 enum FUNCTYPE { UNARY, GAUSSIAN, KB, MOD_KB, SINC, SPHEROIDAL, EXP_SINC };
160 MathFunc(FUNCTYPE, T cutoff, T arg1 = 1.0e+30, T arg2 = 1.0e+30,
541 #ifndef CASACORE_NO_AUTO_TEMPLATES
542 #include <casacore/scimath/Mathematics/MathFunc.tcc>
Exponential times a Sinc.
ExpSincConv< T > & operator=(const ExpSincConv< T > &)
assignment operator
FuncId id() const
return FuncID structure for Table storage/retrieval.
MathFunc< T > * clone() const
for every derived class, return new of that class with its own parameters
T value(const T &) const
and get the value of the function
ExpSincConv(const ExpSincConv< T > &)
copy constructor
ExpSincConv(T cut=MathFunc< T >::defcutoff(), T sincparm=MathFunc< T >::defSincparm(), T exppow=MathFunc< T >::defExpPower(), T expscale=MathFunc< T >::defExpScale())
default constructor
T sup_value() const
get access to the support width
T sup_value() const
return value of support width
FuncId id() const
return a FuncId structure for Table storage/retrieval.
GaussianConv(const GaussianConv< T > &)
copy constructor
T value(const T &) const
compute and return a value of the math function
GaussianConv< T > & operator=(const GaussianConv< T > &)
GaussianConv(T cut=MathFunc< T >::defcutoff(), T wparm=MathFunc< T >::defwidth())
default constructor
MathFunc< T > * clone() const
for every derived class, return new of that class with its own parameters
A Kaiser-Bessel function.
KB_Conv(const KB_Conv< T > &)
copy constructor
T sup_value() const
return value of support width
T value(const T &) const
compute and return a value of the math function
KB_Conv< T > & operator=(const KB_Conv< T > &)
KB_Conv(T cut=MathFunc< T >::defcutoff(), T wparm=MathFunc< T >::defKBwidth(), T kbparm=MathFunc< T >::defKBparm())
default constructor
MathFunc< T > * clone() const
for every derived class, return new of that class with its own parameters
FuncId id() const
return a FuncId structure for Table storage/retrieval.
virtual ~MathFuncError() noexcept
MathFuncError(const Char *m)
MathFuncError(const String &m)
A class to generate values of mathematical functions.
static T defSphparm()
The default parameter for Sph_Conv.
virtual ~MathFunc()
Destructor.
static T defcutoff()
These functions return the static constants used as default parameters for the various derived functi...
MathFunc(MathFunc< T > *)
static MathFunc< T > * newMathFunc(const MathFunc< T > &)
create a new math function
static T defExpPower()
The default exponential power for Exp_Sinc_Conv.
static T defKBwidth()
The default width for KB_Conv and Mod_KB_Conv.
MathFunc< T > & operator=(const MathFunc< T > &)
Assignment operator - Note: this function works only for envelops.
MathFunc(FUNCTYPE, T cutoff, T arg1=1.0e+30, T arg2=1.0e+30, T arg3=1.0e+30)
accept up to 4 arguments, the first being the support radius
virtual MathFunc< T > * clone() const
for every derived class, return new of that class with its own parameters
MathFunc(const MathFunc< T > &)
static T defSphcutoff()
The default support radius for Sinc_Conv and Sph_Conv.
MathFunc(String &, Vector< double > &)
virtual FuncId id() const
return a FuncId structure for Table storage/retrieval.
MathFunc< T > * object
pointer to letter class
static T defExpScale()
The default exponential scale length for Exp_Sinc_Conv.
virtual T sup_value() const
return value of support width
virtual T value(const T &a) const
compute and return a value of the math function
static T defmodKBparm()
A default parameter for Mod_KB_Conv.
static T defSincparm()
The default Sinc parameter for Sinc_Conv and Exp_Sinc_Conv.
MathFunc()
Default constructor (Null)
static T defKBparm()
A default parameter for KB_Conv and Mod_KB_Conv.
static T defwidth()
The default width for Gaussian_Conv.
MathFunc(FUNCTYPE)
constructors
A Kaiser-Bessel function multiplied by a Gaussian.
Mod_KB_Conv(const Mod_KB_Conv< T > &)
copy constructor
T value(const T &) const
compute and return a value of the math function
Mod_KB_Conv< T > & operator=(const Mod_KB_Conv< T > &)
FuncId id() const
return a FuncId structure for Table storage/retrieval.
Mod_KB_Conv(T cut=MathFunc< T >::defcutoff(), T wparm=MathFunc< T >::defKBwidth(), T kbparm=MathFunc< T >::defKBparm(), T gwparm=MathFunc< T >::defmodKBparm())
default constructor
T sup_value() const
return value of support width
MathFunc< T > * clone() const
for every derived class, return new of that class with its own parameters
FuncId id() const
return a FuncId structure for Table storage/retrieval.
T value(const T &) const
compute and return a value of the math function
Sinc_Conv(T cut=MathFunc< T >::defSphcutoff(), T sincparm=MathFunc< T >::defSincparm())
default constructor
T sup_value() const
return value of support width
Sinc_Conv< T > & operator=(const Sinc_Conv< T > &)
MathFunc< T > * clone() const
for every derived class, return new of that class with its own parameters
Sinc_Conv(const Sinc_Conv< T > &)
copy constructor
T sup_value() const
return value of support width
MathFunc< T > * clone() const
for every derived class, return new of that class with its own parameters
FuncId id() const
return a FuncId structure for Table storage/retrieval.
Sph_Conv< T > & operator=(const Sph_Conv< T > &)
Sph_Conv(const Sph_Conv< T > &)
copy constructor
float value(const float &) const
Sph_Conv(T cut=MathFunc< T >::defSphcutoff(), T Sphparm=MathFunc< T >::defSphparm())
default constructor
String: the storage and methods of handling collections of characters.
MathFunc< T > * clone() const
for every derived class, return new of that class with its own parameters
Unary(const Unary< T > &)
copy constructor
FuncId id() const
return a FuncId structure for Table storage/retrieval.
T value(const T &) const
compute and return a value of the math function
Unary< T > & operator=(const Unary< T > &)
T sup_value() const
return value of support width
Unary(T cut=MathFunc< T >::defcutoff())
default constructor
this file contains all the compiler specific defines
Function ID, for use by MathFunc class.
float sphfn(Int ialf, Int im, float eta)
C++ wrapper to Fred Schwab function to calculate spheriodal functions.
Int sphfn(Int *, Int *, Int *, float *, float *, Int *)
Fred Schwab function to calculate spheriodal functions, in C.