LSSTApplications
20.0.0
LSSTDataManagementBasePackage
|
Go to the documentation of this file.
22 #ifndef LSST_AFW_MATH_POLYNOMIALS_Function1d_h_INCLUDED
23 #define LSST_AFW_MATH_POLYNOMIALS_Function1d_h_INCLUDED
29 namespace lsst {
namespace geom {
namespace polynomials {
41 template <
typename Basis_>
54 _coefficients(Eigen::VectorXd::Zero(
basis.
size()))
66 template <
typename Iterator>
105 return _basis.sumWith(
x, _coefficients, mode);
127 return _coefficients.head(
size());
139 Eigen::VectorXd _coefficients;
143 template <
typename Basis>
149 template <
typename Basis,
typename Iterator>
157 #endif // !LSST_AFW_MATH_POLYNOMIALS_Function1d_h_INCLUDED
double & operator[](std::size_t n)
Return the coefficient associated with the nth basis function.
Function1d & operator=(Function1d const &)=default
Default copy assignment.
ndarray::Array< double const, 2, 2 > coefficients
const_iterator cbegin() const
double operator()(double x, SumMode mode=SumMode::FAST) const
Evaluate the function at the given point.
A 1-d affine transform that can be used to map one interval to another.
auto getCoefficients()
Return the coefficient vector as an Eigen matrix-like object.
Basis_ Basis
The basis type used by this function.
const_iterator end() const
Function1d & operator=(Function1d &&)=default
Default move assignment.
Function1d(Basis const &basis, Eigen::VectorXd const &coefficients)
Construct with coefficients from an Eigen object.
Function1d(Function1d &&)=default
Default move constructor.
Function1d(Function1d const &)=default
Default copy constructor.
FastFinder::Iterator Iterator
Function1d< typename Basis::Scaled > scaled(Scaling1d const &scaling) const
Return a new function that applies the given scaling to all points before evaluation.
SumMode
Enum used to control how to sum polynomial terms.
auto getCoefficients() const
table::Key< table::Array< double > > basis
A 1-d function defined by a series expansion and its coefficients.
double const * const_iterator
A base class for image defects.
Function1d(Basis const &basis)
Construct with zero-valued coefficients.
const_iterator cend() const
iterator begin()
Iterators over coefficients.
const_iterator begin() const
Basis const & getBasis() const
Return the associated Basis1d object.
table::Key< double > scaling
double const & operator[](std::size_t n) const
@ FAST
Summation using regular floating-point addition.
Function1d(Basis const &basis, Iterator first, Iterator last)
Construct by copying coefficients from an STL iterator range.
Function1d< Basis > makeFunction1d(Basis const &basis, Eigen::VectorXd const &coefficients)
Create a Function1d of the appropriate type from a Basis1d and an Eigen object containing coefficient...
std::size_t size() const
Return the number of coefficients.