22 #ifndef ASTSHIM_PERMMAP_H 23 #define ASTSHIM_PERMMAP_H 77 explicit PermMap(std::vector<int>
const &inperm, std::vector<int>
const &outperm,
78 std::vector<double>
const &constant = {}, std::string
const &options =
"")
79 :
Mapping(reinterpret_cast<AstMapping *>(makeRawMap(inperm, outperm, constant, options))) {}
94 return copyImpl<PermMap, AstPermMap>();
98 explicit PermMap(AstPermMap *rawptr) :
Mapping(reinterpret_cast<AstMapping *>(rawptr)) {
100 std::ostringstream os;
101 os <<
"this is a " <<
getClassName() <<
", which is not a PermMap";
102 throw std::invalid_argument(os.str());
107 AstPermMap *makeRawMap(std::vector<int>
const &inperm, std::vector<int>
const &outperm,
108 std::vector<double>
const &constant = {}, std::string
const &options =
"");
Mapping(Mapping const &)=default
Copy constructor: make a deep copy.
AstObject const * getRawPtr() const
Definition: Object.h:291
AST wrapper classes and functions.
Definition: attributes_channel.dox:1
std::string getClassName() const
Definition: Object.h:138
PermMap(AstPermMap *rawptr)
Construct a PermMap from a raw AST pointer.
Definition: PermMap.h:98
PermMap(std::vector< int > const &inperm, std::vector< int > const &outperm, std::vector< double > const &constant={}, std::string const &options="")
Definition: PermMap.h:77
PermMap & operator=(PermMap const &)=delete
std::shared_ptr< PermMap > copy() const
Return a deep copy of this object.
Definition: PermMap.h:90
virtual ~PermMap()
Definition: PermMap.h:81
virtual std::shared_ptr< Object > copyPolymorphic() const override
Definition: PermMap.h:93