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;
224 Function1D<T>(other), def_p(other.getDefault()),
225 minx_p(other.getIntervalMin()), maxx_p(other.getIntervalMax()),
226 mode_p(other.getOutOfIntervalMode()) {}
239 void setCoefficients(
const Vector<T> &coeffs);
251 void setCoefficient(
const uInt which,
const T &
value);
254 const Vector<T> &getCoefficients()
const;
260 return ((which < nparameters()) ? param_p[which] : T(0)); }
274 if (xmin < xmax) { minx_p = xmin; maxx_p = xmax;
275 }
else { minx_p = xmax; maxx_p = xmin; } }
313 static void derivativeCoeffs(
Vector<T> &coeffs,
const T &xmin=T(-1),
321 static void chebyshevToPower(
Vector<T> &coeffs);
328 static void powerToChebyshev(
Vector<T> &coeffs);
373 const T &defval=T(0))
377 const T &min,
const T &max,
379 const T &defval=T(0))
418 virtual Bool hasMode()
const;
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 static Vector< String > modes_s
A 1-D Specialization of the Array class.
ChebyshevParamModeImpl_PS(const AutoDiff< T > &min, const AutoDiff< T > &max, typename ChebyshevEnums::OutOfIntervalMode mode=ChebyshevEnums::CONSTANT, const AutoDiff< T > &defval=AutoDiff< T >(0))
ChebyshevParamModeImpl_PS()
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)
ChebyshevParamModeImpl_PSA(const AutoDiffA< T > &min, const AutoDiffA< T > &max, typename ChebyshevEnums::OutOfIntervalMode mode=ChebyshevEnums::CONSTANT, const AutoDiffA< T > &defval=AutoDiffA< T >(0))
PtrHolder< T > & operator=(const PtrHolder< T > &other)
return a constant, default value.
uInt order() const
return the order of this polynomial.
ChebyshevEnums::OutOfIntervalMode mode_p
Out-of-interval handling type.
Parameter handling for Chebyshev polynomial parameters.
T maxx_p
Highest inetrval bound.
Define enums for Chebyshev classes.
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...
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
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.
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.
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
this file contains all the compiler specific defines
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)