22 #ifndef ASTSHIM_LUTMAP_H
23 #define ASTSHIM_LUTMAP_H
27 #include "astshim/base.h"
28 #include "astshim/Mapping.h"
75 explicit LutMap(std::vector<double>
const &lut,
double start,
double inc, std::string
const &options =
"")
76 :
Mapping(reinterpret_cast<AstMapping *>(
77 astLutMap(lut.size(), lut.data(), start, inc,
"%s", options.c_str()))) {}
101 return copyImpl<LutMap, AstLutMap>();
105 explicit LutMap(AstLutMap *rawptr) :
Mapping(reinterpret_cast<AstMapping *>(rawptr)) {
107 std::ostringstream os;
108 os <<
"this is a " <<
getClassName() <<
", which is not a LutMap";
109 throw std::invalid_argument(os.str());
virtual std::shared_ptr< Object > copyPolymorphic() const override
Definition: LutMap.h:100
AstObject const * getRawPtr() const
Definition: Object.h:286
std::shared_ptr< LutMap > copy() const
Return a deep copy of this object.
Definition: LutMap.h:87
double getD(std::string const &attrib) const
Definition: Object.h:373
LutMap(std::vector< double > const &lut, double start, double inc, std::string const &options="")
Definition: LutMap.h:75
int getI(std::string const &attrib) const
Definition: Object.h:399
int getLutInterp() const
Definition: LutMap.h:97
std::string getClassName() const
Definition: Object.h:133
double getLutEpsilon() const
Definition: LutMap.h:92
LutMap(AstLutMap *rawptr)
Construct an LutMap from a raw AST pointer.
Definition: LutMap.h:105