29 template <
class AstMapT,
class MapT>
33 auto const bndSize =
static_cast<unsigned int>(forward ? mapping.getNOut() : mapping.getNIn());
35 if (lbnd.
size() != bndSize) {
37 os <<
"lbnd.size() = " << lbnd.
size() <<
" != " << bndSize <<
" = " 38 << (forward ?
"getNOut()" :
"getNIn()");
41 if (ubnd.
size() != bndSize) {
43 os <<
"ubnd.size() = " << ubnd.
size() <<
" != " << bndSize <<
" = " 44 << (forward ?
"getNOut()" :
"getNIn()");
48 void *outRawMap = astPolyTran(mapping.getRawPtr(),
static_cast<int>(forward), acc, maxacc, maxorder,
52 assertOK(reinterpret_cast<AstObject *>(outRawMap));
56 return reinterpret_cast<AstMapT *
>(outRawMap);
63 std::vector<double>
const &, std::vector<double>
const &);
AST wrapper classes and functions.
void assertOK(AstObject *rawPtr1=nullptr, AstObject *rawPtr2=nullptr)
Throw std::runtime_error if AST's state is bad.
template AstChebyMap * polyTranImpl< AstChebyMap >(ChebyMap const &, bool, double, double, int, std::vector< double > const &, std::vector< double > const &)
A ChebyMap is a form of Mapping which performs a Chebyshev polynomial transformation.
template AstPolyMap * polyTranImpl< AstPolyMap >(PolyMap const &, bool, double, double, int, std::vector< double > const &, std::vector< double > const &)
AstMapT * polyTranImpl(MapT const &mapping, bool forward, double acc, double maxacc, int maxorder, std::vector< double > const &lbnd, std::vector< double > const &ubnd)
Call astPolyTran to set (or replace) one direction of a polynomial transform with a fit based on the ...
PolyMap is a Mapping which performs a general polynomial transformation.