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",
73 explicit MatrixMap(std::vector<double>
const &diag, std::string
const &options =
"")
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)) {
99 std::ostringstream os;
100 os <<
"this is a " <<
getClassName() <<
", which is not a MatrixMap";
101 throw std::invalid_argument(os.str());
ndarray::Array< const double, 2, 2 > ConstArray2D
Definition: base.h:46
AstObject const * getRawPtr() const
Definition: Object.h:292
Definition: MatrixMap.h:42
AST wrapper classes and functions.
Definition: attributes_channel.dox:1
std::string getClassName() const
Definition: Object.h:139
virtual std::shared_ptr< Object > copyPolymorphic() const override
Definition: MatrixMap.h:92
void assertOK(AstObject *rawPtr1=nullptr, AstObject *rawPtr2=nullptr)
Definition: base.cc:49
MatrixMap(AstMatrixMap *rawptr)
Construct a MatrixMap from a raw AST pointer.
Definition: MatrixMap.h:97
MatrixMap & operator=(MatrixMap const &)=delete
virtual ~MatrixMap()
Definition: MatrixMap.h:80
std::shared_ptr< MatrixMap > copy() const
Return a deep copy of this object.
Definition: MatrixMap.h:89
MatrixMap(std::vector< double > const &diag, std::string const &options="")
Definition: MatrixMap.h:73
MatrixMap(ConstArray2D const &matrix, std::string const &options="")
Definition: MatrixMap.h:56