23#ifndef LSST_SHAPELET_MatrixBuilder_h_INCLUDED
24#define LSST_SHAPELET_MatrixBuilder_h_INCLUDED
32namespace lsst {
namespace shapelet {
34class MultiShapeletBasis;
37class MatrixBuilderFactory;
40class MatrixBuilderWorkspace;
71 ndarray::Array<T const,1,1>
const &
x,
72 ndarray::Array<T const,1,1>
const &
y,
86 ndarray::Array<T const,1,1>
const &
x,
87 ndarray::Array<T const,1,1>
const &
y,
100 ndarray::Array<T const,1,1>
const &
x,
101 ndarray::Array<T const,1,1>
const &
y,
115 ndarray::Array<T const,1,1>
const &
x,
116 ndarray::Array<T const,1,1>
const &
y,
139 ndarray::Array<T,2,-1>
const & output,
151 (*this)(output, ellipse);
191 typedef Eigen::Map< Eigen::Array<T,Eigen::Dynamic,Eigen::Dynamic> >
Matrix;
192 typedef Eigen::Map< Eigen::Array<T,Eigen::Dynamic,1> >
Vector;
204 _current(other._current),
206 _manager(other._manager)
224 ndarray::Manager::Ptr
getManager()
const {
return _manager; }
234 ndarray::Manager::Ptr _manager;
281 ndarray::Array<T const,1,1>
const &
x,
282 ndarray::Array<T const,1,1>
const &
y,
296 ndarray::Array<T const,1,1>
const &
x,
297 ndarray::Array<T const,1,1>
const &
y,
310 ndarray::Array<T const,1,1>
const &
x,
311 ndarray::Array<T const,1,1>
const &
y,
325 ndarray::Array<T const,1,1>
const &
x,
326 ndarray::Array<T const,1,1>
const &
y,
An ellipse defined by an arbitrary BaseCore and a center point.
A factory class for MatrixBuilder, providing more control over workspace memory.
MatrixBuilderWorkspace< T > Workspace
Associated workspace class.
MatrixBuilder< T > operator()() const
Return a new MatrixBuilder with internal, unshared workspace.
MatrixBuilder< T > Builder
Associated builder class.
int getDataSize() const
Return the number of data points.
MatrixBuilder< T > operator()(Workspace &workspace) const
Return a new MatrixBuilder using the given workspace.
int getBasisSize() const
Return the number of basis elements.
MatrixBuilderFactory(ndarray::Array< T const, 1, 1 > const &x, ndarray::Array< T const, 1, 1 > const &y, int order)
Create a MatrixBuilder that evaluates a simple non-compound shapelet basis.
MatrixBuilderFactory(ndarray::Array< T const, 1, 1 > const &x, ndarray::Array< T const, 1, 1 > const &y, int order, ShapeletFunction const &psf)
Create a MatrixBuilder that evaluates a simple non-compound shapelet basis after convolving it with a...
MatrixBuilderFactory(ndarray::Array< T const, 1, 1 > const &x, ndarray::Array< T const, 1, 1 > const &y, MultiShapeletBasis const &basis, MultiShapeletFunction const &psf)
Create a MatrixBuilder that evaluates a MultiShapeletBasis object after convolving it with a MultiSha...
MatrixBuilderFactory(ndarray::Array< T const, 1, 1 > const &x, ndarray::Array< T const, 1, 1 > const &y, MultiShapeletBasis const &basis)
Create a MatrixBuilder that evaluates a MultiShapeletBasis object.
int computeWorkspace() const
Return the size of the workspace needed for this MatrixBuilder, in elements of T.
Class that evaluates a (multi-)shapelet basis at predefined points.
int getBasisSize() const
Return the number of basis elements.
MatrixBuilderFactory< T > Factory
Factory type associated with this builder.
MatrixBuilder(ndarray::Array< T const, 1, 1 > const &x, ndarray::Array< T const, 1, 1 > const &y, int order)
Create a MatrixBuilder that evaluates a simple non-compound shapelet basis.
ndarray::Array< T, 2,-2 > allocateOutput() const
Return a matrix appropriate for use as an output for operator().
MatrixBuilder(ndarray::Array< T const, 1, 1 > const &x, ndarray::Array< T const, 1, 1 > const &y, int order, ShapeletFunction const &psf)
Create a MatrixBuilder that evaluates a simple non-compound shapelet basis after convolving it with a...
int getDataSize() const
Return the number of data points.
MatrixBuilderWorkspace< T > Workspace
Workspace type associated with this builder.
MatrixBuilder(ndarray::Array< T const, 1, 1 > const &x, ndarray::Array< T const, 1, 1 > const &y, MultiShapeletBasis const &basis, MultiShapeletFunction const &psf)
Create a MatrixBuilder that evaluates a MultiShapeletBasis object after convolving it with a MultiSha...
void operator()(ndarray::Array< T, 2,-1 > const &output, afw::geom::ellipses::Ellipse const &ellipse) const
Fill an array with the model matrix.
MatrixBuilder(ndarray::Array< T const, 1, 1 > const &x, ndarray::Array< T const, 1, 1 > const &y, MultiShapeletBasis const &basis)
Create a MatrixBuilder that evaluates a MultiShapeletBasis object.
ndarray::Array< T, 2,-2 > operator()(afw::geom::ellipses::Ellipse const &ellipse) const
Return a newly-allocated model matrix.
Reusable, shareable workspace for MatrixBuilder.
int getRemaining() const
Return the size (in units of sizeof(T)) of the unused memory in the workspace.
MatrixBuilderWorkspace(int size)
Allocate a block of memory with the given number of elements (of type T).
Eigen::Map< Eigen::Array< T, Eigen::Dynamic, Eigen::Dynamic > > Matrix
Workspace matrix type.
MatrixBuilderWorkspace(MatrixBuilderWorkspace const &other)
Copy the current state of the workspace, allowing multiple MatrixBuilders to start their workspace ar...
Vector makeVector(int size)
Create a vector from the workspace memory, and increment the current location accordingly.
void increment(int size)
Manually increment the current location.
Eigen::Map< Eigen::Array< T, Eigen::Dynamic, 1 > > Vector
Workspace vector type.
Matrix makeMatrix(int rows, int cols)
Create a matrix from the workspace memory, and increment the current location accordingly.
ndarray::Manager::Ptr getManager() const
Return the manager object that owns the block of memory.
A basis formed from a linear combination of shapelet bases that differ only in radius.
A multi-scale shapelet function.
A 2-d function defined by an expansion onto a Gauss-Laguerre or Gauss-Hermite basis.
A base class for image defects.
Constants, typedefs, and general-purpose functions for shapelets library.
table::Key< table::Array< double > > basis