22 #ifndef ASTSHIM_MATRIXMAP_H 23 #define ASTSHIM_MATRIXMAP_H 57 :
Mapping(reinterpret_cast<AstMapping *>(
59 astMatrixMap(matrix.
getSize<1>(), matrix.
getSize<0>(), 0, matrix.getData(),
"%s",
74 :
Mapping(reinterpret_cast<AstMapping *>(
76 astMatrixMap(diag.size(), diag.size(), 1, diag.
data(),
"%s",
options.c_str()))) {
93 return copyImpl<MatrixMap, AstMatrixMap>();
97 explicit MatrixMap(AstMatrixMap *rawptr) :
Mapping(reinterpret_cast<AstMapping *>(rawptr)) {
100 os <<
"this is a " <<
getClassName() <<
", which is not a MatrixMap";
ndarray::Array< const double, 2, 2 > ConstArray2D
2D array of const double; typically used for lists of const points
AstObject const * getRawPtr() const
Get the raw AST pointer.
MatrixMap is a form of Mapping which performs a general linear transformation.
AST wrapper classes and functions.
std::string getClassName() const
Get Class: the name of the class (e.g.
virtual std::shared_ptr< Object > copyPolymorphic() const override
Return a deep copy of this object.
void assertOK(AstObject *rawPtr1=nullptr, AstObject *rawPtr2=nullptr)
Throw std::runtime_error if AST's state is bad.
MatrixMap(AstMatrixMap *rawptr)
Construct a MatrixMap from a raw AST pointer.
An abstract base class for objects which transform one set of coordinates to another.
MatrixMap & operator=(MatrixMap const &)=delete
std::shared_ptr< MatrixMap > copy() const
Return a deep copy of this object.
T static_pointer_cast(T... args)
Abstract base class for all AST objects.
MatrixMap(std::vector< double > const &diag, std::string const &options="")
Construct a MatrixMap from a 1-d vector of diagonal elements of a diagonal matrix.
MatrixMap(ConstArray2D const &matrix, std::string const &options="")
Construct a MatrixMap from a 2-d matrix.