22 #ifndef ASTSHIM_MATHMAP_H
23 #define ASTSHIM_MATHMAP_H
375 MathMap(
int nin,
int nout, std::vector<std::string>
const &fwd, std::vector<std::string>
const &rev,
376 std::string
const &options =
"")
377 :
Mapping(reinterpret_cast<AstMapping *>(astMathMap(nin, nout, fwd.size(), getCStrVec(fwd).data(),
378 rev.size(), getCStrVec(rev).data(),
"%s",
411 return copyImpl<MathMap, AstMathMap>();
415 explicit MathMap(AstMathMap *rawptr) :
Mapping(reinterpret_cast<AstMapping *>(rawptr)) {
417 std::ostringstream os;
418 os <<
"this is a " <<
getClassName() <<
", which is not a MathMap";
419 throw std::invalid_argument(os.str());
425 std::vector<char const *> getCStrVec(std::vector<std::string>
const &strVec) {
426 std::vector<char const *> cstrVec;
427 for (
auto const &str : strVec) {
428 cstrVec.push_back(str.c_str());
MathMap & operator=(MathMap &&)=default
virtual std::shared_ptr< Object > copyPolymorphic() const override
Definition: MathMap.h:410
MathMap(MathMap const &)=default
Copy constructor: make a deep copy.
MathMap(int nin, int nout, std::vector< std::string > const &fwd, std::vector< std::string > const &rev, std::string const &options="")
Definition: MathMap.h:375
virtual ~MathMap()
Definition: MathMap.h:383
MathMap & operator=(MathMap const &)=delete
std::shared_ptr< MathMap > copy() const
Return a deep copy of this object.
Definition: MathMap.h:392
MathMap(MathMap &&)=default
int getSeed() const
Definition: MathMap.h:397
bool getSimpIF() const
Definition: MathMap.h:407
bool getSimpFI() const
Definition: MathMap.h:402
MathMap(AstMathMap *rawptr)
Construct a MathMap from a raw AST pointer.
Definition: MathMap.h:415
std::string getClassName() const
Definition: Object.h:139
bool getB(std::string const &attrib) const
Definition: Object.h:348
AstObject const * getRawPtr() const
Definition: Object.h:292
int getI(std::string const &attrib) const
Definition: Object.h:400
AST wrapper classes and functions.
Definition: attributes_channel.dox:1
void assertOK(AstObject *rawPtr1=nullptr, AstObject *rawPtr2=nullptr)
Definition: base.cc:49