23 #ifndef LSST_SHAPELET_MatrixBuilder_h_INCLUDED 24 #define LSST_SHAPELET_MatrixBuilder_h_INCLUDED 32 namespace lsst {
namespace shapelet {
34 class MultiShapeletBasis;
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);
187 template <
typename T>
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)
215 Matrix makeMatrix(
int rows,
int cols);
218 Vector makeVector(
int size);
221 void increment(
int size);
224 ndarray::Manager::Ptr
getManager()
const {
return _manager; }
234 ndarray::Manager::Ptr _manager;
264 template <
typename T>
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,
338 int computeWorkspace()
const;
352 #endif // !LSST_SHAPELET_MatrixBuilder_h_INCLUDED int getBasisSize() const
Return the number of basis elements.
ndarray::Array< T, 2,-2 > operator()(afw::geom::ellipses::Ellipse const &ellipse) const
Return a newly-allocated model matrix.
int getDataSize() const
Return the number of data points.
Eigen::Map< Eigen::Array< T, Eigen::Dynamic, 1 > > Vector
Workspace vector type.
MatrixBuilder< T > Builder
Associated builder class.
void operator()(ndarray::Array< T, 2,-1 > const &output, afw::geom::ellipses::Ellipse const &ellipse) const
Fill an array with the model matrix.
ItemVariant const * other
A factory class for MatrixBuilder, providing more control over workspace memory.
int getRemaining() const
Return the size (in units of sizeof(T)) of the unused memory in the workspace.
A basis formed from a linear combination of shapelet bases that differ only in radius.
MatrixBuilderWorkspace< T > Workspace
Workspace type associated with this builder.
A base class for image defects.
A multi-scale shapelet function.
MatrixBuilderWorkspace< T > Workspace
Associated workspace class.
An ellipse defined by an arbitrary BaseCore and a center point.
ndarray::Array< T, 2,-2 > allocateOutput() const
Return a matrix appropriate for use as an output for operator().
Reusable, shareable workspace for MatrixBuilder.
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.
Class that evaluates a (multi-)shapelet basis at predefined points.
table::Key< table::Array< double > > basis
friend class MatrixBuilderFactory
MatrixBuilderFactory< T > Factory
Factory type associated with this builder.
Eigen::Map< Eigen::Array< T, Eigen::Dynamic, Eigen::Dynamic > > Matrix
Workspace matrix type.
Constants, typedefs, and general-purpose functions for shapelets library.
ndarray::Manager::Ptr getManager() const
Return the manager object that owns the block of memory.
A 2-d function defined by an expansion onto a Gauss-Laguerre or Gauss-Hermite basis.
MatrixBuilderWorkspace(MatrixBuilderWorkspace const &other)
Copy the current state of the workspace, allowing multiple MatrixBuilders to start their workspace ar...