29 #ifndef SCIMATH_CHEBYSHEVPARAM_H
30 #define SCIMATH_CHEBYSHEVPARAM_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/casa/Arrays/ArrayFwd.h>
34 #include <casacore/casa/BasicSL/String.h>
35 #include <casacore/scimath/Functionals/Function1D.h>
40 class RecordInterface;
373 const T &defval=T(0))
377 const T &
min,
const T &
max,
379 const T &defval=T(0))
431 #define ChebyshevParamModeImpl_PS ChebyshevParamModeImpl
486 #define ChebyshevParamModeImpl_PSA ChebyshevParamModeImpl
547 #ifndef CASACORE_NO_AUTO_TEMPLATES
548 #include <casacore/scimath/Functionals/ChebyshevParam.tcc>
#define ChebyshevParamModeImpl_PSA
#define ChebyshevParamModeImpl_PS
OutOfIntervalMode
Modes that identify how this function behaves outside its Chebyshev interval (see setInterval()).
@ NOutOfIntervalModes
number of enumerators
@ CYCLIC
evaluate the function as if the range is cyclic, repeating the range values from its canonical domain...
@ CONSTANT
return a constant, default value.
@ EDGE
evaluate the function at nearest interval edge
@ ZEROTH
return a constant value equal to the zero-th order coefficient
@ EXTRAPOLATE
evaluate the polynomial based on its coefficients just as it would be inside the interval.
virtual void setMode(const RecordInterface &mode)
get/set the function mode.
ChebyshevParamModeImpl_PSA(const Vector< AutoDiffA< T > > &coeffs, const AutoDiffA< T > &min, const AutoDiffA< T > &max, typename ChebyshevEnums::OutOfIntervalMode mode=ChebyshevEnums::CONSTANT, const AutoDiffA< T > &defval=AutoDiffA< T >(0))
ChebyshevParamModeImpl_PSA(uInt order, const RecordInterface &mode)
ChebyshevParamModeImpl_PSA(const AutoDiffA< T > &min, const AutoDiffA< T > &max, typename ChebyshevEnums::OutOfIntervalMode mode=ChebyshevEnums::CONSTANT, const AutoDiffA< T > &defval=AutoDiffA< T >(0))
ChebyshevParamModeImpl_PSA(const ChebyshevParamModeImpl_PSA &other)
ChebyshevParamModeImpl_PSA(const uInt n)
ChebyshevParamModeImpl_PSA()
virtual void getMode(RecordInterface &mode) const
ChebyshevParamModeImpl_PSA(const Vector< AutoDiffA< T > > &coeffs, const RecordInterface &mode)
virtual void setMode(const RecordInterface &mode)
get/set the function mode.
ChebyshevParamModeImpl_PS(const AutoDiff< T > &min, const AutoDiff< T > &max, typename ChebyshevEnums::OutOfIntervalMode mode=ChebyshevEnums::CONSTANT, const AutoDiff< T > &defval=AutoDiff< T >(0))
virtual void getMode(RecordInterface &mode) const
ChebyshevParamModeImpl_PS()
ChebyshevParamModeImpl_PS(const Vector< AutoDiff< T > > &coeffs, const AutoDiff< T > &min, const AutoDiff< T > &max, typename ChebyshevEnums::OutOfIntervalMode mode=ChebyshevEnums::CONSTANT, const AutoDiff< T > &defval=AutoDiff< T >(0))
ChebyshevParamModeImpl_PS(uInt order, const RecordInterface &mode)
ChebyshevParamModeImpl_PS(const uInt n)
ChebyshevParamModeImpl_PS(const Vector< AutoDiff< T > > &coeffs, const RecordInterface &mode)
ChebyshevParamModeImpl_PS(const ChebyshevParamModeImpl_PS &other)
A ChebyshevParam with the get/setMode implementation.
virtual Bool hasMode() const
return True if the implementing function supports a mode.
virtual void getMode(RecordInterface &mode) const
ChebyshevParamModeImpl(const ChebyshevParamModeImpl &other)
ChebyshevParamModeImpl(const Vector< T > &coeffs, const T &min, const T &max, typename ChebyshevEnums::OutOfIntervalMode mode=ChebyshevEnums::CONSTANT, const T &defval=T(0))
ChebyshevParamModeImpl(const T &min, const T &max, typename ChebyshevEnums::OutOfIntervalMode mode=ChebyshevEnums::CONSTANT, const T &defval=T(0))
ChebyshevParamModeImpl(uInt order, const RecordInterface &mode)
virtual void setMode(const RecordInterface &mode)
get/set the function mode.
ChebyshevParamModeImpl(const uInt n)
ChebyshevParamModeImpl(const Vector< T > &coeffs, const RecordInterface &mode)
Parameter handling for Chebyshev polynomial parameters.
ChebyshevParam(const uInt n)
create an n-th order Chebyshev polynomial with the coefficients equal to zero.
void setCoefficients(const Vector< T > &coeffs)
set the Chebyshev coefficients.
T getIntervalMin() const
return the minimum value for the currently Chebyshev interval.
void setCoefficient(const uInt which, const T &value)
set a particular Chebyshev coefficient.
T def_p
Default value if outside interval.
ChebyshevParam()
create a zero-th order Chebyshev polynomial with the first coefficient equal to zero.
void setDefault(const T &val)
set the default value of this function.
const T & getDefault() const
return the currently set default value.
uInt order() const
return the order of this polynomial.
ChebyshevParam(uInt order, const RecordInterface &mode)
create a fully specified Chebyshev polynomial.
virtual const String & name() const
Give name of function.
ChebyshevParam(const T &min, const T &max, ChebyshevEnums::OutOfIntervalMode mode=ChebyshevEnums::CONSTANT, const T &defval=T(0))
create a zero-th order Chebyshev polynomical with the first coefficient equal to one.
static void derivativeCoeffs(Vector< T > &coeffs, const T &xmin=T(-1), const T &xmax=T(1))
transform a set of Chebyshev polynomial coefficients into a set representing the series' derivative.
T getIntervalMax() const
return the maximum value for the currently Chebyshev interval.
ChebyshevEnums::OutOfIntervalMode getOutOfIntervalMode() const
return the behavior of this function when it is evaluated outside of its Chebyshev interval.
ChebyshevParam(const ChebyshevParam &other)
create a deep copy of another Chebyshev polynomial
static void powerToChebyshev(Vector< T > &coeffs)
convert a set of power series coefficients to Chebyshev polynomial coefficients.
ChebyshevParam(const ChebyshevParam< W > &other)
void setOutOfIntervalMode(ChebyshevEnums::OutOfIntervalMode mode)
set the behavior of this function when it is evaluated outside its Chebyshev interval
T maxx_p
Highest inetrval bound.
static Vector< String > modes_s
T getCoefficient(const uInt which) const
return a particular coefficient.
ChebyshevParam< T > & operator=(const ChebyshevParam< T > &other)
make a (deep) copy of another Chebyshev polynomial
virtual ~ChebyshevParam()
Destructor.
ChebyshevParam(const Vector< T > &coeffs, const T &min, const T &max, ChebyshevEnums::OutOfIntervalMode mode=ChebyshevEnums::CONSTANT, const T &defval=T(0))
create a fully specified Chebyshev polynomial.
ChebyshevParam(const Vector< T > &coeffs, const RecordInterface &mode)
uInt nCoefficients() const
return the number of coeefficients currently loaded.
ChebyshevEnums::OutOfIntervalMode mode_p
Out-of-interval handling type.
T minx_p
Lowest interval bound.
void setInterval(T xmin, T xmax)
set the Chebyshev interval for this function.
const Vector< T > & getCoefficients() const
return the current set of coefficients into a given Vector.
static void chebyshevToPower(Vector< T > &coeffs)
convert a set of Chebyshev polynomial coefficients to power series coefficients.
FunctionParam< T > param_p
The parameters and masks.
uInt nparameters() const
Returns the number of parameters.
String: the storage and methods of handling collections of characters.
this file contains all the compiler specific defines
LatticeExprNode max(const LatticeExprNode &left, const LatticeExprNode &right)
LatticeExprNode min(const LatticeExprNode &left, const LatticeExprNode &right)
bool Bool
Define the standard types used by Casacore.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.