33 os <<
"this is a " <<
getClassName() <<
", which is not a SplineMap";
39AstSplineMap *SplineMap::_makeRawSplineMap(
int kx,
int ky,
int nx,
int ny,
std::vector<double> const &tx,
43 const size_t nTx = tx.
size();
44 const size_t nTy = ty.
size();
45 const size_t nCoeffsU = cu.
size();
46 const size_t nCoeffsV = cv.
size();
48 if ((kx < 0) || (ky < 0) || (nx < 0) || (ny < 0)) {
51 if (((
size_t)(kx + nx) != nTx) || ((
size_t)(ky + ny) != nTy)) {
53 "the number of coefficients.");
55 if (((
size_t)(nx * ny) != nCoeffsU) || ((
size_t)(nx * ny) != nCoeffsV)) {
56 throw std::invalid_argument(
"The length of the coefficients must equal product of the arguments nx "
60 return reinterpret_cast<AstSplineMap *
>(astSplineMap(kx, ky, nx, ny, tx.
data(), ty.
data(), cu.
data(),
Mapping(Mapping const &)=default
Copy constructor: make a deep copy.
std::string getClassName() const
Get Class: the name of the class (e.g.
AstObject const * getRawPtr() const
Get the raw AST pointer.
SplineMap(int kx, int ky, int nx, int ny, std::vector< double > const &tx, std::vector< double > const &ty, std::vector< double > const &cu, std::vector< double > const &cv, std::string const &options="")
Construct a SplineMap with the forward transform specified by the supplied b-splines and the inverse ...
AST wrapper classes and functions.