29 #ifndef SCIMATH_CHEBYSHEVPARAM_H
30 #define SCIMATH_CHEBYSHEVPARAM_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>
549 #endif //# CASACORE_NO_AUTO_TEMPLATES
uInt nparameters() const
Returns the number of parameters.
static Vector< String > modes_s
ChebyshevParamModeImpl_PS(const AutoDiff< T > &min, const AutoDiff< T > &max, typename ChebyshevEnums::OutOfIntervalMode mode=ChebyshevEnums::CONSTANT, const AutoDiff< T > &defval=AutoDiff< T >(0))
FunctionParam< T > param_p
The parameters and masks.
ChebyshevParamModeImpl_PS()
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...
ChebyshevParamModeImpl_PS(const Vector< AutoDiff< T > > &coeffs, const RecordInterface &mode)
ChebyshevParamModeImpl(const ChebyshevParamModeImpl &other)
evaluate the function at nearest interval edge
ChebyshevParamModeImpl_PSA(const Vector< AutoDiffA< T > > &coeffs, const RecordInterface &mode)
T def_p
Default value if outside interval.
A ChebyshevParam with the get/setMode implementation.
ChebyshevParamModeImpl_PSA()
void setDefault(const T &val)
set the default value of this function.
ChebyshevParamModeImpl_PSA(const ChebyshevParamModeImpl_PSA &other)
LatticeExprNode max(const LatticeExprNode &left, const LatticeExprNode &right)
ChebyshevParamModeImpl_PSA(const AutoDiffA< T > &min, const AutoDiffA< T > &max, typename ChebyshevEnums::OutOfIntervalMode mode=ChebyshevEnums::CONSTANT, const AutoDiffA< T > &defval=AutoDiffA< T >(0))
void setCoefficient(const uInt which, const T &value)
set a particular Chebyshev coefficient.
ChebyshevParam()
create a zero-th order Chebyshev polynomial with the first coefficient equal to zero.
static void powerToChebyshev(Vector< T > &coeffs)
convert a set of power series coefficients to Chebyshev polynomial coefficients.
return a constant, default value.
uInt order() const
return the order of this polynomial.
static void chebyshevToPower(Vector< T > &coeffs)
convert a set of Chebyshev polynomial coefficients to power series coefficients.
ChebyshevEnums::OutOfIntervalMode mode_p
Out-of-interval handling type.
virtual void getMode(RecordInterface &mode) const
Parameter handling for Chebyshev polynomial parameters.
const Vector< T > & getCoefficients() const
return the current set of coefficients into a given Vector.
T maxx_p
Highest inetrval bound.
Define enums for Chebyshev classes.
ChebyshevParam< T > & operator=(const ChebyshevParam< T > &other)
make a (deep) copy of another Chebyshev polynomial
evaluate the polynomial based on its coefficients just as it would be inside the interval.
virtual const String & name() const
Give name of function.
ChebyshevParamModeImpl_PS(const uInt n)
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))
evaluate the function as if the range is cyclic, repeating the range values from its canonical domain...
virtual Bool hasMode() const
return True if the implementing function supports a mode.
ChebyshevParamModeImpl(uInt order, const RecordInterface &mode)
ChebyshevParamModeImpl(const T &min, const T &max, typename ChebyshevEnums::OutOfIntervalMode mode=ChebyshevEnums::CONSTANT, const T &defval=T(0))
const T & getDefault() const
return the currently set default value.
#define ChebyshevParamModeImpl_PSA
LatticeExprNode min(const LatticeExprNode &left, const LatticeExprNode &right)
void setInterval(T xmin, T xmax)
set the Chebyshev interval for this function.
ChebyshevParamModeImpl_PSA(uInt order, const RecordInterface &mode)
ChebyshevParam(const ChebyshevParam< W > &other)
uInt nCoefficients() const
return the number of coeefficients currently loaded.
bool Bool
Define the standard types used by Casacore.
Class that computes partial derivatives by automatic differentiation.
ChebyshevParamModeImpl(const Vector< T > &coeffs, const T &min, const T &max, typename ChebyshevEnums::OutOfIntervalMode mode=ChebyshevEnums::CONSTANT, const T &defval=T(0))
ChebyshevParamModeImpl_PS(uInt order, const RecordInterface &mode)
T getIntervalMax() const
return the maximum value for the currently Chebyshev interval.
T getIntervalMin() const
return the minimum value for the currently Chebyshev interval.
ChebyshevParamModeImpl_PSA(const uInt n)
void setOutOfIntervalMode(ChebyshevEnums::OutOfIntervalMode mode)
set the behavior of this function when it is evaluated outside its Chebyshev interval ...
ChebyshevParamModeImpl_PS(const ChebyshevParamModeImpl_PS &other)
Numerical functional interface class for 1 dimension.
virtual ~ChebyshevParam()
Destructor.
virtual void setMode(const RecordInterface &mode)
get/set the function mode.
Class that computes partial derivatives by automatic differentiation.
OutOfIntervalMode
Modes that identify how this function behaves outside its Chebyshev interval (see setInterval())...
String: the storage and methods of handling collections of characters.
T minx_p
Lowest interval bound.
T getCoefficient(const uInt which) const
return a particular coefficient.
void setCoefficients(const Vector< T > &coeffs)
set the Chebyshev coefficients.
Abstract base class for Record classes.
ChebyshevEnums::OutOfIntervalMode getOutOfIntervalMode() const
return the behavior of this function when it is evaluated outside of its Chebyshev interval...
ChebyshevParamModeImpl(const uInt n)
return a constant value equal to the zero-th order coefficient
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))
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
#define ChebyshevParamModeImpl_PS
ChebyshevParamModeImpl(const Vector< T > &coeffs, const RecordInterface &mode)