22 #ifndef ASTSHIM_LUTMAP_H 23 #define ASTSHIM_LUTMAP_H 76 :
Mapping(reinterpret_cast<AstMapping *>(
77 astLutMap(lut.size(), lut.
data(), start, inc,
"%s",
options.c_str()))) {
104 return copyImpl<LutMap, AstLutMap>();
108 explicit LutMap(AstLutMap *rawptr) :
Mapping(reinterpret_cast<AstMapping *>(rawptr)) {
111 os <<
"this is a " <<
getClassName() <<
", which is not a LutMap";
AstObject const * getRawPtr() const
Get the raw AST pointer.
virtual std::shared_ptr< Object > copyPolymorphic() const override
Return a deep copy of this object.
int getI(std::string const &attrib) const
Get the value of an attribute as an int.
AST wrapper classes and functions.
std::string getClassName() const
Get Class: the name of the class (e.g.
LutMap is a specialised form of Mapping which transforms 1-dimensional coordinates by using linear in...
void assertOK(AstObject *rawPtr1=nullptr, AstObject *rawPtr2=nullptr)
Throw std::runtime_error if AST's state is bad.
An abstract base class for objects which transform one set of coordinates to another.
double getLutEpsilon() const
Get attribute LutEpsilon: the relative error of the values in the table.
T static_pointer_cast(T... args)
int getLutInterp() const
Get attribute LutInterp: the interpolation method to use between table entries.
LutMap & operator=(LutMap const &)=delete
LutMap(std::vector< double > const &lut, double start, double inc, std::string const &options="")
Construct an LutMap.
double getD(std::string const &attrib) const
Get the value of an attribute as a double.
Abstract base class for all AST objects.
std::shared_ptr< LutMap > copy() const
Return a deep copy of this object.
LutMap(AstLutMap *rawptr)
Construct an LutMap from a raw AST pointer.