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