22 #ifndef ASTSHIM_LUTMAP_H
23 #define ASTSHIM_LUTMAP_H
27 #include "astshim/base.h"
28 #include "astshim/Mapping.h"
77 explicit LutMap(std::vector<double>
const &lut,
double start,
double inc, std::string
const &options =
"")
78 :
Mapping(reinterpret_cast<AstMapping *>(
79 astLutMap(lut.size(), lut.data(), start, inc,
"%s", options.c_str()))) {}
103 return copyImpl<LutMap, AstLutMap>();
107 explicit LutMap(AstLutMap *rawptr) :
Mapping(reinterpret_cast<AstMapping *>(rawptr)) {
109 std::ostringstream os;
110 os <<
"this is a " <<
getClassName() <<
", which is not a LutMap";
111 throw std::invalid_argument(os.str());
int getLutInterp() const
Definition: LutMap.h:99
std::shared_ptr< LutMap > copy() const
Return a deep copy of this object.
Definition: LutMap.h:89
virtual std::shared_ptr< Object > copyPolymorphic() const override
Definition: LutMap.h:102
double getD(std::string const &attrib) const
Definition: Object.h:357
double getLutEpsilon() const
Definition: LutMap.h:94
LutMap(AstLutMap *rawptr)
Construct an LutMap from a raw AST pointer.
Definition: LutMap.h:107
int getI(std::string const &attrib) const
Definition: Object.h:383
LutMap(std::vector< double > const &lut, double start, double inc, std::string const &options="")
Definition: LutMap.h:77
std::string getClassName() const
Definition: Object.h:118
AstObject const * getRawPtr() const
Definition: Object.h:270