#include <StorableInterpolationFunctor.h>
Public Types | |
typedef LinInterpolatedTableND < Numeric, Axis > | Table |
Public Member Functions | |
virtual unsigned | minDim () const |
virtual double | operator() (const double *point, unsigned dim) const |
void | setConverter (const Converter &conv) |
template<class Num2 , class Conv2 > | |
StorableInterpolationFunctor (const StorableInterpolationFunctor< Num2, Axis, Conv2 > &tab) | |
virtual | ~StorableInterpolationFunctor () |
template<class Num2 > | |
StorableInterpolationFunctor (const LinInterpolatedTableND< Num2, Axis > &table) | |
template<class Num2 > | |
StorableInterpolationFunctor (const LinInterpolatedTableND< Num2, Axis > &table, const std::string &descr) | |
StorableInterpolationFunctor (const std::vector< Axis > &axes, const std::vector< std::pair< bool, bool > > &interpolationType, const char *functionLabel=0) | |
StorableInterpolationFunctor (const Axis &xAxis, bool leftX, bool rightX, const char *functionLabel=0) | |
StorableInterpolationFunctor (const Axis &xAxis, bool leftX, bool rightX, const Axis &yAxis, bool leftY, bool rightY, const char *functionLabel=0) | |
StorableInterpolationFunctor (const Axis &xAxis, bool leftX, bool rightX, const Axis &yAxis, bool leftY, bool rightY, const Axis &zAxis, bool leftZ, bool rightZ, const char *functionLabel=0) | |
StorableInterpolationFunctor (const Axis &xAxis, bool leftX, bool rightX, const Axis &yAxis, bool leftY, bool rightY, const Axis &zAxis, bool leftZ, bool rightZ, const Axis &tAxis, bool leftT, bool rightT, const char *functionLabel=0) | |
StorableInterpolationFunctor (const Axis &xAxis, bool leftX, bool rightX, const Axis &yAxis, bool leftY, bool rightY, const Axis &zAxis, bool leftZ, bool rightZ, const Axis &tAxis, bool leftT, bool rightT, const Axis &vAxis, bool leftV, bool rightV, const char *functionLabel=0) | |
Table & | interpolator () |
const Table & | interpolator () const |
ArrayND< Numeric > & | table () |
const ArrayND< Numeric > & | table () const |
virtual gs::ClassId | classId () const |
virtual bool | write (std::ostream &of) const |
Static Public Member Functions | |
static const char * | classname () |
static StorableInterpolationFunctor * | read (const gs::ClassId &id, std::istream &in) |
static unsigned | version () |
Protected Member Functions | |
virtual bool | isEqual (const StorableMultivariateFunctor &other) const |
Private Member Functions | |
StorableInterpolationFunctor () | |
Private Attributes | |
Converter | conv_ |
Table | table_ |
Friends | |
class | StorableInterpolationFunctor |
This class adapts LinInterpolatedTableND template to the StorableMultivariateFunctor interface
Definition at line 30 of file StorableInterpolationFunctor.h.
typedef LinInterpolatedTableND<Numeric,Axis> npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::Table |
Definition at line 36 of file StorableInterpolationFunctor.h.
npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::StorableInterpolationFunctor | ( | const LinInterpolatedTableND< Num2, Axis > & | table | ) | [inline] |
Constructor from a pre-existing table
Definition at line 41 of file StorableInterpolationFunctor.h.
: StorableMultivariateFunctor(), table_(table) {}
npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::StorableInterpolationFunctor | ( | const LinInterpolatedTableND< Num2, Axis > & | table, |
const std::string & | descr | ||
) | [inline] |
Definition at line 46 of file StorableInterpolationFunctor.h.
: StorableMultivariateFunctor(descr), table_(table) {}
npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::StorableInterpolationFunctor | ( | const StorableInterpolationFunctor< Num2, Axis, Conv2 > & | tab | ) | [inline] |
Converting copy constructor
Definition at line 54 of file StorableInterpolationFunctor.h.
: StorableMultivariateFunctor(tab.description()), table_(tab.table_) {}
npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::StorableInterpolationFunctor | ( | const std::vector< Axis > & | axes, |
const std::vector< std::pair< bool, bool > > & | interpolationType, | ||
const char * | functionLabel = 0 |
||
) | [inline] |
Constructor which builds the table in place. It basically passses its arguments to the corresponding constructor of LinInterpolatedTableND.
Definition at line 65 of file StorableInterpolationFunctor.h.
: StorableMultivariateFunctor(), table_(axes, interpolationType, functionLabel) {}
npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::StorableInterpolationFunctor | ( | const Axis & | xAxis, |
bool | leftX, | ||
bool | rightX, | ||
const char * | functionLabel = 0 |
||
) | [inline] |
Definition at line 72 of file StorableInterpolationFunctor.h.
: StorableMultivariateFunctor(), table_(xAxis, leftX, rightX, functionLabel) {}
npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::StorableInterpolationFunctor | ( | const Axis & | xAxis, |
bool | leftX, | ||
bool | rightX, | ||
const Axis & | yAxis, | ||
bool | leftY, | ||
bool | rightY, | ||
const char * | functionLabel = 0 |
||
) | [inline] |
Definition at line 78 of file StorableInterpolationFunctor.h.
: StorableMultivariateFunctor(), table_(xAxis, leftX, rightX, yAxis, leftY, rightY, functionLabel) {}
npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::StorableInterpolationFunctor | ( | const Axis & | xAxis, |
bool | leftX, | ||
bool | rightX, | ||
const Axis & | yAxis, | ||
bool | leftY, | ||
bool | rightY, | ||
const Axis & | zAxis, | ||
bool | leftZ, | ||
bool | rightZ, | ||
const char * | functionLabel = 0 |
||
) | [inline] |
Definition at line 86 of file StorableInterpolationFunctor.h.
: StorableMultivariateFunctor(), table_(xAxis, leftX, rightX, yAxis, leftY, rightY, zAxis, leftZ, rightZ, functionLabel) {}
npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::StorableInterpolationFunctor | ( | const Axis & | xAxis, |
bool | leftX, | ||
bool | rightX, | ||
const Axis & | yAxis, | ||
bool | leftY, | ||
bool | rightY, | ||
const Axis & | zAxis, | ||
bool | leftZ, | ||
bool | rightZ, | ||
const Axis & | tAxis, | ||
bool | leftT, | ||
bool | rightT, | ||
const char * | functionLabel = 0 |
||
) | [inline] |
Definition at line 96 of file StorableInterpolationFunctor.h.
: StorableMultivariateFunctor(), table_(xAxis, leftX, rightX, yAxis, leftY, rightY, zAxis, leftZ, rightZ, tAxis, leftT, rightT, functionLabel) {}
npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::StorableInterpolationFunctor | ( | const Axis & | xAxis, |
bool | leftX, | ||
bool | rightX, | ||
const Axis & | yAxis, | ||
bool | leftY, | ||
bool | rightY, | ||
const Axis & | zAxis, | ||
bool | leftZ, | ||
bool | rightZ, | ||
const Axis & | tAxis, | ||
bool | leftT, | ||
bool | rightT, | ||
const Axis & | vAxis, | ||
bool | leftV, | ||
bool | rightV, | ||
const char * | functionLabel = 0 |
||
) | [inline] |
Definition at line 108 of file StorableInterpolationFunctor.h.
: StorableMultivariateFunctor(), table_(xAxis, leftX, rightX, yAxis, leftY, rightY, zAxis, leftZ, rightZ, tAxis, leftT, rightT, vAxis, leftV, rightV, functionLabel) {}
virtual npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::~StorableInterpolationFunctor | ( | ) | [inline, virtual] |
Definition at line 123 of file StorableInterpolationFunctor.h.
{}
npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::StorableInterpolationFunctor | ( | ) | [private] |
virtual gs::ClassId npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::classId | ( | ) | const [inline, virtual] |
Method related to "geners" I/O
Implements npstat::StorableMultivariateFunctor.
Definition at line 147 of file StorableInterpolationFunctor.h.
{return gs::ClassId(*this);}
const char * npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::classname | ( | ) | [inline, static] |
Reimplemented from npstat::StorableMultivariateFunctor.
Definition at line 182 of file StorableInterpolationFunctor.h.
References AlCaHLTBitMon_QueryRunRegistry::string.
{ static const std::string myClass(gs::template_class_name<Numeric,Axis>( "npstat::StorableInterpolationFunctor")); return myClass.c_str(); }
const Table& npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::interpolator | ( | ) | const [inline] |
Definition at line 133 of file StorableInterpolationFunctor.h.
References npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::table_.
{return table_;}
Table& npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::interpolator | ( | ) | [inline] |
Retrieve the underlying LinInterpolatedTableND object
Definition at line 132 of file StorableInterpolationFunctor.h.
References npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::table_.
{return table_;}
virtual bool npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::isEqual | ( | const StorableMultivariateFunctor & | ) | const [inline, protected, virtual] |
Method needed to compare objects for equality. Must be overriden by derived classes. It is left up to the derived classes to decide whether they should compare description strings in order to establish equality.
Implements npstat::StorableMultivariateFunctor.
Definition at line 158 of file StorableInterpolationFunctor.h.
References npstat::StorableMultivariateFunctor::description(), alignCSCRings::r, and npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::table_.
{ // Note the use of static_cast rather than dynamic_cast below. // static_cast works faster and it is guaranteed to succeed here. const StorableInterpolationFunctor& r = static_cast<const StorableInterpolationFunctor&>(other); return table_ == r.table_ && this->description() == other.description(); }
virtual unsigned npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::minDim | ( | ) | const [inline, virtual] |
Minimum expected dimensionality
Implements npstat::AbsMultivariateFunctor.
Definition at line 125 of file StorableInterpolationFunctor.h.
References npstat::LinInterpolatedTableND< Numeric, Axis >::dim(), and npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::table_.
virtual double npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::operator() | ( | const double * | point, |
unsigned | dim | ||
) | const [inline, virtual] |
Function value
Implements npstat::AbsMultivariateFunctor.
Definition at line 127 of file StorableInterpolationFunctor.h.
References npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::conv_, and npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::table_.
StorableInterpolationFunctor< Numeric, Axis, Converter > * npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::read | ( | const gs::ClassId & | id, |
std::istream & | in | ||
) | [static] |
Reimplemented from npstat::StorableMultivariateFunctor.
Definition at line 199 of file StorableInterpolationFunctor.h.
References cond::rpcobimon::current, SiPixelLorentzAngle_cfi::read, AlCaHLTBitMon_QueryRunRegistry::string, and accesses::tab.
{ static const gs::ClassId current( gs::ClassId::makeId<StorableInterpolationFunctor<Numeric,Axis> >()); current.ensureSameId(id); std::string descr; gs::read_pod(in, &descr); gs::ClassId tabid(in, 1); if (in.fail()) throw gs::IOReadFailure( "In npstat::StorableInterpolationFunctor::read: " "input stream failure"); CPP11_auto_ptr<Table> tab(Table::read(tabid, in)); return new StorableInterpolationFunctor(*tab, descr); }
void npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::setConverter | ( | const Converter & | conv | ) | [inline] |
Change the coordinate converter
Definition at line 143 of file StorableInterpolationFunctor.h.
References conv, and npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::conv_.
const ArrayND<Numeric>& npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::table | ( | ) | const [inline] |
Definition at line 139 of file StorableInterpolationFunctor.h.
References npstat::LinInterpolatedTableND< Numeric, Axis >::table(), and npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::table_.
ArrayND<Numeric>& npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::table | ( | ) | [inline] |
Retrieve the tabulated data
Definition at line 138 of file StorableInterpolationFunctor.h.
References npstat::LinInterpolatedTableND< Numeric, Axis >::table(), and npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::table_.
static unsigned npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::version | ( | ) | [inline, static] |
Reimplemented from npstat::StorableMultivariateFunctor.
Definition at line 153 of file StorableInterpolationFunctor.h.
{return 1;}
bool npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::write | ( | std::ostream & | of | ) | const [virtual] |
Implements npstat::StorableMultivariateFunctor.
Definition at line 190 of file StorableInterpolationFunctor.h.
References npstat::LinInterpolatedTableND< Numeric, Axis >::classId(), idDealer::description, table_, and npstat::LinInterpolatedTableND< Numeric, Axis >::write().
{ gs::write_pod(of, this->description()); return table_.classId().write(of) && table_.write(of); }
friend class StorableInterpolationFunctor [friend] |
Definition at line 33 of file StorableInterpolationFunctor.h.
Converter npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::conv_ [private] |
Definition at line 172 of file StorableInterpolationFunctor.h.
Referenced by npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::operator()(), and npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::setConverter().
Table npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::table_ [private] |
Definition at line 171 of file StorableInterpolationFunctor.h.
Referenced by npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::interpolator(), npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::isEqual(), npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::minDim(), npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::operator()(), and npstat::StorableInterpolationFunctor< Numeric, Axis, Converter >::table().