LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
|
#include <TrapezoidalPacker.h>
Public Member Functions | |
TrapezoidalPacker (ChebyshevBoundedFieldControl const &ctrl) | |
void | pack (ndarray::Array< double, 1, 1 > const &out, ndarray::Array< double const, 1, 1 > const &tx, ndarray::Array< double const, 1, 1 > const &ty) const |
void | pack (ndarray::Array< double, 1, 1 > const &out, ndarray::Array< double const, 2, 2 > const &unpacked) const |
void | unpack (ndarray::Array< double, 2, 2 > const &out, ndarray::Array< double const, 1, 1 > const &packed) const |
ndarray::Array< double, 2, 2 > | unpack (ndarray::Array< double const, 1, 1 > const &packed) const |
Public Attributes | |
int | nx |
int | ny |
int | m |
int | size |
A helper class ChebyshevBoundedField, for mapping trapezoidal matrices to 1-d arrays.
This class is not Swigged, and should not be included by any other .h files (including lsst/afw/math/detail.h); it's for internal use by ChebyshevBoundedField only, and it's only in a header file instead of that .cc file only so it can be unit tested.
We characterize the matrices by their number of columns (nx) and rows (ny), and the number of complete rows minus one (m).
This splits up the matrix into a rectangular part, in which the number of columns is the same for each row, and a wide trapezoidal or triangular part, in which the number of columns decreases by one for each row.
Here are some examples of how this class handles different kinds of matrices:
A wide trapezoidal matrix with orderX=4, orderY=3: nx=5, ny=4, m=0
0 1 2 3 4 5 6 7 8 9 10 11 12 13
A tall trapezoidal matrix with orderX=2, orderY=4 nx=3, ny=5, m=2
0 1 2 3 4 5 6 7 8 9 10 11
A triangular matrix with orderX=3, orderY=3 nx=4, ny=5, m=0
0 1 2 3 4 5 6 7 8 9
A wide rectangular matrix with orderX=3, orderY=2 nx=4, ny=3, m=3
0 1 2 3 4 5 6 7 8 9 10 11
A tall rectangular matrix with orderX=2, orderY=3 nx=3, ny=4, m=4
0 1 2 3 4 5 6 7 8 9 10 11
Definition at line 87 of file TrapezoidalPacker.h.
|
explicit |
Definition at line 28 of file TrapezoidalPacker.cc.
void lsst::afw::math::detail::TrapezoidalPacker::pack | ( | ndarray::Array< double, 1, 1 > const & | out, |
ndarray::Array< double const, 1, 1 > const & | tx, | ||
ndarray::Array< double const, 1, 1 > const & | ty | ||
) | const |
Definition at line 45 of file TrapezoidalPacker.cc.
void lsst::afw::math::detail::TrapezoidalPacker::pack | ( | ndarray::Array< double, 1, 1 > const & | out, |
ndarray::Array< double const, 2, 2 > const & | unpacked | ||
) | const |
Definition at line 63 of file TrapezoidalPacker.cc.
void lsst::afw::math::detail::TrapezoidalPacker::unpack | ( | ndarray::Array< double, 2, 2 > const & | out, |
ndarray::Array< double const, 1, 1 > const & | packed | ||
) | const |
Definition at line 82 of file TrapezoidalPacker.cc.
ndarray::Array< double, 2, 2 > lsst::afw::math::detail::TrapezoidalPacker::unpack | ( | ndarray::Array< double const, 1, 1 > const & | packed | ) | const |
Definition at line 102 of file TrapezoidalPacker.cc.
int lsst::afw::math::detail::TrapezoidalPacker::m |
Definition at line 113 of file TrapezoidalPacker.h.
int lsst::afw::math::detail::TrapezoidalPacker::nx |
Definition at line 111 of file TrapezoidalPacker.h.
int lsst::afw::math::detail::TrapezoidalPacker::ny |
Definition at line 112 of file TrapezoidalPacker.h.
int lsst::afw::math::detail::TrapezoidalPacker::size |
Definition at line 114 of file TrapezoidalPacker.h.