35 int minOutCoord,
int maxOutCoord)
38 minOutCoord(minOutCoord),
39 maxOutCoord(maxOutCoord),
44 _compute(map, lbnd, ubnd, minOutCoord, maxOutCoord);
49 int const nin = map.
getNIn();
53 if (maxOutCoord == 0) {
56 }
else if ((maxOutCoord < 0) || (maxOutCoord > nout)) {
58 os <<
"maxOutCoord = " << maxOutCoord <<
" not in range [1, " << nout <<
"], or 0 for all remaining";
61 if ((minOutCoord < 0) || (minOutCoord >
maxOutCoord)) {
63 os <<
"minOutCoord = " << minOutCoord <<
" not in range [1, " << maxOutCoord <<
"]";
69 xl = ndarray::allocate(ndarray::makeVector(npoints, nout));
70 xu = ndarray::allocate(ndarray::makeVector(npoints, nout));
71 bool const forward =
true;
74 for (
int i = 0, outcoord = minOutCoord; outcoord <=
maxOutCoord; ++i, ++outcoord) {
77 astMapBox(map.
getRawPtr(), lbnd.
data(), ubnd.
data(), forward, outcoord, &lbndOut_i, &ubndOut_i,
78 xlrow.getData(), xurow.getData());
int minOutCoord
Minimum output coordinate axis for which to compute an output bounding box, starting from 1...
AstObject const * getRawPtr() const
Get the raw AST pointer.
MapBox(Mapping const &map, std::vector< double > const &lbnd, std::vector< double > const &ubnd, int minOutCoord=1, int maxOutCoord=0)
Find a bounding box for a Mapping.
AST wrapper classes and functions.
void assertOK(AstObject *rawPtr1=nullptr, AstObject *rawPtr2=nullptr)
Throw std::runtime_error if AST's state is bad.
void astBadToNan(std::vector< double > &p)
Replace AST__BAD with a quiet NaN in a vector.
An abstract base class for objects which transform one set of coordinates to another.
std::vector< double > lbndOut
Lower bound of the output box.
Array2D xl
2-d array of [out coord, an input point at which the lower bound occurred]
int getNIn() const
Get NIn: the number of input axes.
void assertEqual(T1 val1, std::string const &descr1, T2 val2, std::string const &descr2)
int getNOut() const
Get NOut: the number of output axes.
std::vector< double > ubndOut
Upper bound of the output box.
Array2D xu
2-d array of [out coord, an input point at which the upper bound occurred]
int maxOutCoord
Maximum output coordinate axis for which to compute an output bounding box, starting from 1...