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
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.
Class that computes partial derivatives by automatic differentiation.
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)
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.
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.
evaluate the function at nearest interval edge
ChebyshevParam(const ChebyshevParam< W > &other)
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.
ChebyshevParamModeImpl_PSA(const ChebyshevParamModeImpl_PSA &other)
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.
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.
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)
ChebyshevParamModeImpl(const ChebyshevParamModeImpl &other)
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.
Class that computes partial derivatives by automatic differentiation.
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.
Abstract base class for Record classes.
Parameter handling for Chebyshev polynomial parameters.
ChebyshevEnums::OutOfIntervalMode mode_p
Out-of-interval handling type.
String: the storage and methods of handling collections of characters.
Numerical functional interface class for 1 dimension.
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)
A 1-D Specialization of the Array class.
ChebyshevParamModeImpl(const T &min, const T &max, typename ChebyshevEnums::OutOfIntervalMode mode=ChebyshevEnums::CONSTANT, const T &defval=T(0))
Define enums for Chebyshev classes.
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.
ChebyshevParamModeImpl(const Vector< T > &coeffs, const T &min, const T &max, typename ChebyshevEnums::OutOfIntervalMode mode=ChebyshevEnums::CONSTANT, const T &defval=T(0))