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());
AstObject const * getRawPtr() const
Definition: Object.h:286
virtual std::shared_ptr< Object > copyPolymorphic() const override
Definition: LutMap.h:100
int getI(std::string const &attrib) const
Definition: Object.h:399
AST wrapper classes and functions.
Definition: attributes_channel.dox:1
std::string getClassName() const
Definition: Object.h:133
double getLutEpsilon() const
Definition: LutMap.h:92
int getLutInterp() const
Definition: LutMap.h:97
LutMap(std::vector< double > const &lut, double start, double inc, std::string const &options="")
Definition: LutMap.h:75
double getD(std::string const &attrib) const
Definition: Object.h:373
std::shared_ptr< LutMap > copy() const
Return a deep copy of this object.
Definition: LutMap.h:87
LutMap(AstLutMap *rawptr)
Construct an LutMap from a raw AST pointer.
Definition: LutMap.h:105