Go to the documentation of this file. 1 #ifndef NPSTAT_GRIDAXIS_HH_
2 #define NPSTAT_GRIDAXIS_HH_
20 #include "Alignment/Geners/interface/ClassId.hh"
37 explicit GridAxis(
const std::vector<double>&
coords,
bool useLogSpace =
false);
104 inline void setLabel(
const char* newlabel) {
label_ = newlabel ? newlabel :
""; }
108 inline gs::ClassId
classId()
const {
return gs::ClassId(*
this); }
109 bool write(std::ostream& of)
const;
112 static inline const char*
classname() {
return "npstat::GridAxis"; }
113 static inline unsigned version() {
return 2; }
129 #endif // NPSTAT_GRIDAXIS_HH_
bool operator==(const GridAxis &r) const
const std::vector< double > & coords() const
bool operator!=(const GridAxis &r) const
static const char * classname()
bool usesLogSpace() const
unsigned nIntervals() const
std::pair< unsigned, double > linearInterval(double coordinate) const
static GridAxis * read(const gs::ClassId &id, std::istream &in)
gs::ClassId classId() const
double intervalWidth(const unsigned i=0) const
double coordinate(const unsigned i) const
void setLabel(const char *newlabel)
std::pair< unsigned, double > getInterval(double coordinate) const
bool isClose(const GridAxis &r, double tol) const
std::vector< double > coords_
bool write(std::ostream &of) const
static unsigned version()
std::vector< double > logs_
const std::string & label() const