LSSTApplications
20.0.0
LSSTDataManagementBasePackage
|
Go to the documentation of this file.
22 #ifndef LSST_AFW_MATH_POLYNOMIALS_ScaledBasis2d_h_INCLUDED
23 #define LSST_AFW_MATH_POLYNOMIALS_ScaledBasis2d_h_INCLUDED
27 namespace lsst {
namespace geom {
namespace polynomials {
29 template <
typename Basis>
42 template <
typename Nested>
95 Nested
const &
getNested() const noexcept {
return _nested; }
162 template <
typename Vector>
169 template <
typename Vector>
185 template <
typename Vector>
188 std::forward<Vector>(
basis));
192 template <
typename Vector>
195 std::forward<Vector>(
basis),
206 #endif // !LSST_AFW_MATH_POLYNOMIALS_ScaledBasis2d_h_INCLUDED
typename Nested::IndexRange IndexRange
The type returned by getIndices().
A 2-d separable affine transform that can be used to map one interval to another.
ScaledBasis2d & operator=(ScaledBasis2d const &)=default
Default copy assignment.
ScaledBasis2d(ScaledBasis2d &&)=default
Default move constructor.
ndarray::Array< double const, 2, 2 > coefficients
Scaling2d const & getScaling() const noexcept
Return the scaling transform.
A 2-d basis that transforms all input points before evaluating nested basis.
double sumWith(geom::Point2D const &point, Vector const &coefficients, SumMode mode=SumMode::FAST) const
Evaluate a basis expansion with the given coefficients.
Workspace makeWorkspace() const
Allocate a workspace that can be passed to sumWith() and fill() to avoid repeated memory allocations.
Nested const & getNested() const noexcept
Return the nested basis.
ScaledBasis2d(std::size_t order, Box2D const &box)
Construct a basis that remaps the given box to [-1, 1]x[-1, 1] before evaluating the nested polynomia...
ScaledBasis2d(ScaledBasis2d const &)=default
Default copy constructor.
double sumWith(geom::Point2D const &point, Vector const &coefficients, Workspace &workspace, SumMode mode=SumMode::FAST) const
Evaluate a basis expansion with the given coefficients (external workspace version).
int index(int x, int y) const
Return the flattened index of the basis function with the given x and y orders.
void fill(geom::Point2D const &point, Vector &&basis, Workspace &workspace) const
Evaluate the basis at a given point (external workspace version).
typename Nested::Workspace Workspace
The type returned by makeWorkspace().
ScaledBasis2d & operator=(ScaledBasis2d &&)=default
Default move assignment.
SumMode
Enum used to control how to sum polynomial terms.
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
std::size_t size() const
Return the number of elements in the basis.
Scaling2d makeUnitRangeScaling2d(geom::Box2D const &box)
Return a Scaling1d that maps the given box to [-1, 1]x[-1, 1].
table::Key< table::Array< double > > basis
std::size_t getOrder() const
Return the order of the basis.
void fill(geom::Point2D const &point, Vector &&basis) const
Evaluate the basis at a given point.
Scaled scaled(Scaling2d const &first) const
Return a scaled basis that delegates to a copy of this.
A base class for image defects.
A floating-point coordinate rectangle geometry.
ScaledBasis2d(Nested const &nested, Scaling2d const &scaling)
Construct a scaled basis from a nested basis and a scaling transform.
table::Key< double > scaling
@ FAST
Summation using regular floating-point addition.
IndexRange getIndices() const
Return a range of iterators that dereference to Index2d.
A 2-d function defined by a series expansion and its coefficients.