ant
A2 ant: class-based analysis framework
ant::VarAxisSettings Class Reference

#include <BinSettings.h>

+ Inheritance diagram for ant::VarAxisSettings:
+ Collaboration diagram for ant::VarAxisSettings:

Public Member Functions

 VarAxisSettings (const std::string &label_, const VarBinSettings &bin_settings)
 AxisSettings equivalent to manage axes with a variable bin width. More...
 
 VarAxisSettings (const std::string &label_, const std::initializer_list< double > edges)
 AxisSettings equivalent to manage axes with a variable bin width. More...
 
const std::string & Label () const
 
std::string & Label ()
 
- Public Member Functions inherited from ant::VarBinSettings
 VarBinSettings (std::vector< double > edges)
 BinSettings equivalent used for variable bin widths. More...
 
unsigned int Bins () const noexcept
 
unsigned int & Bins () noexcept
 
std::vector< double > Edges () const noexcept
 
std::vector< double > & Edges () noexcept
 
int getBin (const double v) const noexcept
 Get the number of the bin a value would end up in. More...
 
- Public Member Functions inherited from ant::interval< double >
constexpr interval (const double &start, const double &stop) noexcept
 
constexpr const double & Start () const noexcept
 Get the lower boundary. More...
 
double & Start () noexcept
 Get the lower boundary. More...
 
constexpr const double & Stop () const noexcept
 Get the upper boundary. More...
 
double & Stop () noexcept
 Get the upper boundary. More...
 
constexpr double Length () const noexcept
 Get the length of the interval. More...
 
constexpr double Center () const noexcept
 Get the center. More...
 
interval< double > & operator+= (const double &a)
 Add a value to both boundaries. This shifts the interval to higher values. More...
 
interval< double > & operator-= (const double &a)
 Subtract a value to both boundaries. This shifts the interval to lower values. More...
 
interval< double > & operator*= (const double &f)
 Multiply both boundaries with a factor. This scales the interval (but also moves the center if center != 0) More...
 
interval< double > & operator/= (const double &f)
 Deivide both boundaries by a factor. This scales the interval (but also moves the center if center != 0) More...
 
interval< double > operator+ (const double &a) const
 Add a value to both boundaries and return the resulting interval (a new copy) The result is shifted to higher values (if a positive, of course). More...
 
interval< double > operator- (const double &a) const
 Subtract a value to both boundaries and return the resulting interval (a new copy) The result is shifted to lower values (if a positive, of course). More...
 
interval< double > operator* (const double &f) const
 Multiply both boundaries with a factor and return the resulting interval (a new copy). The result is scaled and the center is shifted if != 0. More...
 
interval< double > operator/ (const double &f) const
 Deivide both boundaries by a factor and return the resulting interval (a new copy). The result is scaled and the center is shifted if != 0. More...
 
double operator[] (const index_t n) const
 operator []: Access boundaries array-style More...
 
constexpr bool operator== (const interval< double > &rhs) const noexcept
 
constexpr bool operator!= (const interval< double > &rhs) const noexcept
 
void SetWidth (const double &width)
 
void SetCenter (const double &center)
 
constexpr bool Contains (const double &x) const noexcept
 
constexpr bool Disjoint (const ant::interval< double > &i) const noexcept
 
void Extend (const interval< double > &other)
 Extend the interval if the given covers a larger range. More...
 
void Extend (const double &other)
 Extend the interval if the given covers a larger range. More...
 
bool tryJoinWith (const ant::interval< double > &other)
 Join another interval into this one if they overlap. More...
 
void MakeSane ()
 Make sure, start < stop. More...
 
constexpr bool IsSane () const noexcept
 
constexpr double Clip (const double &x) const
 Clip x to be inside the interval. More...
 
interval< double > & Round () noexcept
 Round boundaries to integer using std::round. More...
 
std::string AsRangeString (const std::string &label="x") const noexcept
 AsRangeString makes "mathematical" string expression of interval. More...
 

Protected Attributes

std::string label
 
- Protected Attributes inherited from ant::VarBinSettings
unsigned int bins
 
std::vector< double > bin_edges
 
- Protected Attributes inherited from ant::interval< double >
double _start
 
double _stop
 

Additional Inherited Members

- Static Public Member Functions inherited from ant::interval< double >
static constexpr interval CenterWidth (const double center, const double width) noexcept
 Factory Function: Create interval from center and width. More...
 
static constexpr interval getMaxRange () noexcept
 
static constexpr interval getMaxPositiveRange () noexcept
 
static constexpr interval getMaxNegativeRange () noexcept
 

Constructor & Destructor Documentation

◆ VarAxisSettings() [1/2]

ant::VarAxisSettings::VarAxisSettings ( const std::string &  label_,
const VarBinSettings bin_settings 
)
inline

AxisSettings equivalent to manage axes with a variable bin width.

Parameters
label_Axis label
bin_settingsVarBinSettings for the variable bin widths for this axis

◆ VarAxisSettings() [2/2]

ant::VarAxisSettings::VarAxisSettings ( const std::string &  label_,
const std::initializer_list< double >  edges 
)
inline

AxisSettings equivalent to manage axes with a variable bin width.

Parameters
label_Axis label
edgeslist containing the bin edges for the variable bin widths for this axis

Member Function Documentation

◆ Label() [1/2]

const std::string& ant::VarAxisSettings::Label ( ) const
inline

◆ Label() [2/2]

std::string& ant::VarAxisSettings::Label ( )
inline

Member Data Documentation

◆ label

std::string ant::VarAxisSettings::label
protected

The documentation for this class was generated from the following file: