26#ifndef SCIMATH_MATHFUNC_H
27#define SCIMATH_MATHFUNC_H
33#include <casacore/casa/aips.h>
34#include <casacore/casa/BasicMath/Math.h>
35#include <casacore/casa/BasicSL/Constants.h>
36#include <casacore/casa/Exceptions/Error.h>
37#include <casacore/casa/Arrays/Vector.h>
38#include <casacore/casa/BasicSL/String.h>
112enum FUNCTYPE { UNARY, GAUSSIAN, KB, MOD_KB, SINC, SPHEROIDAL, EXP_SINC };
158 MathFunc(FUNCTYPE, T cutoff, T arg1 = 1.0e+30, T arg2 = 1.0e+30,
539#ifndef CASACORE_NO_AUTO_TEMPLATES
540#include <casacore/scimath/Mathematics/MathFunc.tcc>
Exponential times a Sinc.
FuncId id() const
return FuncID structure for Table storage/retrieval.
ExpSincConv< T > & operator=(const ExpSincConv< T > &)
assignment operator
T value(const T &) const
and get the value of the function
MathFunc< T > * clone() const
for every derived class, return new of that class with its own parameters
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
MathFunc< T > * clone() const
for every derived class, return new of that class with its own parameters
T sup_value() const
return value of support width
GaussianConv< T > & operator=(const GaussianConv< T > &)
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 cut=MathFunc< T >::defcutoff(), T wparm=MathFunc< T >::defwidth())
default constructor
A Kaiser-Bessel function.
KB_Conv(const KB_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
KB_Conv< T > & operator=(const KB_Conv< T > &)
T value(const T &) const
compute and return a value of the math function
KB_Conv(T cut=MathFunc< T >::defcutoff(), T wparm=MathFunc< T >::defKBwidth(), T kbparm=MathFunc< T >::defKBparm())
default constructor
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.
static MathFunc< T > * newMathFunc(const MathFunc< T > &)
create a new math function
virtual ~MathFunc()
Destructor.
static T defcutoff()
These functions return the static constants used as default parameters for the various derived functi...
virtual MathFunc< T > * clone() const
for every derived class, return new of that class with its own parameters
MathFunc(MathFunc< T > *)
static T defExpPower()
The default exponential power for Exp_Sinc_Conv.
MathFunc< T > & operator=(const MathFunc< T > &)
Assignment operator - Note: this function works only for envelops.
static T defKBwidth()
The default width for KB_Conv and Mod_KB_Conv.
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
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.
MathFunc< T > * clone() const
for every derived class, return new of that class with its own parameters
Mod_KB_Conv(const Mod_KB_Conv< T > &)
copy constructor
Mod_KB_Conv< T > & operator=(const Mod_KB_Conv< T > &)
T value(const T &) const
compute and return a value of the math function
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
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 > & operator=(const Sinc_Conv< T > &)
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(const Sinc_Conv< T > &)
copy constructor
MathFunc< T > * clone() const
for every derived class, return new of that class with its own parameters
T sup_value() const
return value of support width
FuncId id() const
return a FuncId structure for Table storage/retrieval.
MathFunc< T > * clone() const
for every derived class, return new of that class with its own parameters
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.
Unary< T > & operator=(const Unary< T > &)
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
T sup_value() const
return value of support width
Unary(T cut=MathFunc< T >::defcutoff())
default constructor
MathFunc< T > * clone() const
for every derived class, return new of that class with its own parameters
this file contains all the compiler specific defines
Function ID, for use by MathFunc class.
Enum used to identify function type for MathFunc class.
Fred Schwab function to calculate spheriodal functions.
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.