Template Class Chebyshev1Function1¶
Defined in File FunctionLibrary.h
Inheritance Relationships¶
Base Type¶
public lsst::afw::math::Function1< ReturnT >(Template Class Function1)
Class Documentation¶
- 
template<typename 
ReturnT>
classChebyshev1Function1: public lsst::afw::math::Function1<ReturnT>¶ 1-dimensional weighted sum of Chebyshev polynomials of the first kind.
f(x) = c0 T0(x’) + c1 T1(x’) + c2 T2(x’) + … = c0 + c1 T1(x’) + c2 T2(x’) + … where:
Tn(x) is the nth Chebyshev function of the first kind: T0(x) = 1 T1(x) = 2 Tn+1(x) = 2xTn(x) + Tn-1(x)
x’ is x offset and scaled to range [-1, 1] as x ranges over [minX, maxX]
The function argument must be in the range [minX, maxX].
Public Functions
- 
Chebyshev1Function1(unsigned int order, double minX = -1, double maxX = 1)¶ - Parameters
 order: order of polynomial (0 for constant)minX: minimum allowed xmaxX: maximum allowed x
Construct a Chebyshev polynomial of specified order and range.
The parameters are initialized to zero.
- 
Chebyshev1Function1(std::vector<double> params, double minX = -1, double maxX = 1)¶ - Parameters
 params: polynomial coefficientsminX: minimum allowed xmaxX: maximum allowed x
Construct a Chebyshev polynomial with specified parameters and range.
The order of the polynomial is set to the length of the params vector.
- Exceptions
 lsst::pex::exceptions::InvalidParameterError: if params is empty
- 
Chebyshev1Function1(Chebyshev1Function1 const&)¶ 
- 
Chebyshev1Function1(Chebyshev1Function1&&)¶ 
- 
Chebyshev1Function1 &
operator=(Chebyshev1Function1 const&)¶ 
- 
Chebyshev1Function1 &
operator=(Chebyshev1Function1&&)¶ 
- 
~Chebyshev1Function1()¶ 
- 
std::shared_ptr<Function1<ReturnT>> 
clone() const¶ Return a pointer to a deep copy of this function
This function exists instead of a copy constructor so one can obtain a copy of an actual function instead of a useless copy of the base class.
Every concrete subclass must override this method.
- Return
 a pointer to a deep copy of the function
- 
double 
getMinX() const¶ Get minimum allowed x
- 
double 
getMaxX() const¶ Get maximum allowed x
- 
unsigned int 
getOrder() const¶ Get the polynomial order
- 
bool 
isLinearCombination() const¶ Is the function a linear combination of its parameters?
- Return
 true if the function can be expressed as: sum over i of parameter_i * function_i(args)
- Warning
 : subclasses must override if true.
- 
ReturnT 
operator()(double x) const¶ 
- 
std::string 
toString(std::string const&) const¶ Return a string representation of the function
- Return
 a string representation of the function
Protected Functions
- 
Chebyshev1Function1()¶