22 #ifndef LSST_AFW_MATH_POLYNOMIALS_RecurrenceBasis1d_h_INCLUDED 23 #define LSST_AFW_MATH_POLYNOMIALS_RecurrenceBasis1d_h_INCLUDED 28 namespace lsst {
namespace geom {
namespace polynomials {
30 template <
typename Basis>
46 static double getB0(
double x);
49 static double getB1(
double x);
61 static double next(
double x,
std::size_t n,
double current,
double previous);
84 template <
typename Recurrence>
145 template <
typename Vector>
154 sum += coefficients[1]*current;
157 sum += coefficients[n]*
next;
171 result =
static_cast<double>(
z);
186 template <
typename Vector>
194 std::forward<Vector>(
basis)[n - 1],
195 std::forward<Vector>(
basis)[n - 2]
207 #endif // !LSST_AFW_MATH_POLYNOMIALS_RecurrenceBasis1d_h_INCLUDED std::size_t getOrder() const noexcept
Return the order of the basis.
A 1-d basis that transforms all input points before evaluating nested basis.
std::size_t size() const noexcept
Return the number of elements in the basis.
void fill(double x, Vector &&basis) const
Evaluate the basis at a given point.
Summation using regular floating-point addition.
A numerically stable summation algorithm for floating-point numbers.
SumMode
Enum used to control how to sum polynomial terms.
A 1-d function defined by a series expansion and its coefficients.
A base class for image defects.
static double getB0(double x)
Return the zeroth element of the basis, .
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
Typedefs to be used for probability and parameter values.
A recurrence relation concept for RecurrenceBasis1d.
static double next(double x, std::size_t n, double current, double previous)
Return the next element in the recurrence.
table::Key< table::Array< double > > basis
static double getB1(double x)
Return the first element of the basis, .
A 1-d affine transform that can be used to map one interval to another.
double sumWith(double x, Vector const &coefficients, SumMode mode=SumMode::FAST) const
Evaluate a basis expansion with the given coefficients.
A basis for 1-d series expansions defined by a recurrence relation.
Scaled scaled(Scaling1d const &scaling) const noexcept
Return a scaled basis with the same order and recurrence.
RecurrenceBasis1d(std::size_t order) noexcept
Construct a basis with the given order (inclusive).
ndarray::Array< double const, 2, 2 > coefficients