Manages a cell-like division of a coordinate. More...
Public Member Functions | |
GridAxisClass () | |
Default constructor: an invalid range. More... | |
GridAxisClass (size_t nDiv, float new_min, float new_max) | |
Constructor: sets the limits and the number of cells. More... | |
bool | hasCell (std::ptrdiff_t iCell) const |
Returns whether the cell is present or not. More... | |
bool | hasCoord (float coord) const |
Returns whether the coordinate is included in the range or not. More... | |
float | Length () const |
Returns the length of the axis. More... | |
size_t | NCells () const |
Returns the length of the axis. More... | |
bool | isEmpty () const |
Returns whether minimum and maximum match. More... | |
float | CellSize () const |
Returns the cell size. More... | |
float | LowerEdge (std::ptrdiff_t iCell) const |
Returns the lower edge of the cell. More... | |
float | UpperEdge (std::ptrdiff_t iCell) const |
Returns the upper edge of the cell. More... | |
bool | Init (size_t nDiv, float new_min, float new_max) |
Initialize the axis, returns whether cell size is finite. More... | |
bool | SetLimits (float new_min, float new_max) |
Initialize the axis limits, returns whether cell size is finite. More... | |
bool | SetMinCellSize (float min_size) |
bool | SetMaxCellSize (float max_size) |
bool | SetCellSizeBoundary (float min_size, float max_size) |
template<typename Stream > | |
void | Dump (Stream &&out) const |
std::ptrdiff_t | GetCell (float coord) const |
Returns the index of the specified cell. More... | |
std::ptrdiff_t | operator() (float coord) const |
float | Min () const |
Returns the extremes of the axis. More... | |
float | Max () const |
Private Attributes | |
size_t | n_cells |
number of cells in the axis More... | |
float | min |
float | max |
extremes of the axis More... | |
float | cell_size |
size of each cell More... | |
Manages a cell-like division of a coordinate.
Definition at line 370 of file RawDataDrawer.cxx.
|
inline |
Default constructor: an invalid range.
Definition at line 373 of file RawDataDrawer.cxx.
|
inline |
Constructor: sets the limits and the number of cells.
Definition at line 376 of file RawDataDrawer.cxx.
|
inline |
Returns the cell size.
Definition at line 439 of file RawDataDrawer.cxx.
void evd::details::GridAxisClass::Dump | ( | Stream && | out | ) | const |
Definition at line 2078 of file RawDataDrawer.cxx.
std::ptrdiff_t evd::details::GridAxisClass::GetCell | ( | float | coord | ) | const |
Returns the index of the specified cell.
Definition at line 2019 of file RawDataDrawer.cxx.
|
inline |
Returns whether the cell is present or not.
Definition at line 390 of file RawDataDrawer.cxx.
|
inline |
Returns whether the coordinate is included in the range or not.
Definition at line 397 of file RawDataDrawer.cxx.
bool evd::details::GridAxisClass::Init | ( | size_t | nDiv, |
float | new_min, | ||
float | new_max | ||
) |
Initialize the axis, returns whether cell size is finite.
Definition at line 2026 of file RawDataDrawer.cxx.
|
inline |
|
inline |
|
inline |
Returns the lower edge of the cell.
Definition at line 446 of file RawDataDrawer.cxx.
|
inline |
Definition at line 410 of file RawDataDrawer.cxx.
|
inline |
|
inline |
Returns the length of the axis.
Definition at line 425 of file RawDataDrawer.cxx.
|
inline |
Definition at line 382 of file RawDataDrawer.cxx.
|
inline |
Expands the cell (at fixed range) to meet maximum cell size
Definition at line 475 of file RawDataDrawer.cxx.
bool evd::details::GridAxisClass::SetLimits | ( | float | new_min, |
float | new_max | ||
) |
Initialize the axis limits, returns whether cell size is finite.
Definition at line 2036 of file RawDataDrawer.cxx.
bool evd::details::GridAxisClass::SetMaxCellSize | ( | float | max_size | ) |
Expands the cell (at fixed range) to meet maximum cell size
Definition at line 2062 of file RawDataDrawer.cxx.
bool evd::details::GridAxisClass::SetMinCellSize | ( | float | min_size | ) |
Expands the cell (at fixed range) to meet minimum cell size
Definition at line 2047 of file RawDataDrawer.cxx.
|
inline |
Returns the upper edge of the cell.
Definition at line 453 of file RawDataDrawer.cxx.
|
private |
size of each cell
Definition at line 487 of file RawDataDrawer.cxx.
|
private |
extremes of the axis
Definition at line 485 of file RawDataDrawer.cxx.
|
private |
Definition at line 485 of file RawDataDrawer.cxx.
|
private |
number of cells in the axis
Definition at line 484 of file RawDataDrawer.cxx.