Alexandria 2.31.0
SDC-CH common library for the Euclid project
|
#include <EdgeVector.h>
Public Member Functions | |
virtual | ~EdgeVector ()=default |
EdgeVector (EdgeVector &&)=default | |
template<typename... Args> | |
EdgeVector (Args &&... args) | |
EdgeVector (const EdgeVector &)=default | |
ssize_t | getBinIndex (VarType value) const final |
std::pair< VarType, VarType > | getBinEdges (size_t i) const final |
VarType | getEdge (size_t i) const final |
![]() | |
BinStrategy () | |
virtual | ~BinStrategy ()=default |
size_t | getBinCount () const |
virtual std::vector< VarType > | getEdges () const |
virtual VarType | getBin (size_t i) const |
Private Attributes | |
std::vector< VarType > | m_edges |
Additional Inherited Members | |
![]() | |
size_t | m_nbins |
Bin strategy based on a fixed set of edges given by the user. The number of bins is equal to the number of edges minus one. Each interval is open to the right, except the last one, which is closed. So,
\[ \mathit{bin}_i = [\mathit{edge}_{i}, \mathit{edge}_{i+i}) \\ ... \\ \mathit{bin}_n= [\mathit{edge}_{n}, \mathit{edge}_{n+i}] \]
Definition at line 47 of file EdgeVector.h.
|
virtualdefault |
|
default |
|
inlineexplicit |
Definition at line 54 of file EdgeVector.h.
References Euclid::Histogram::Binning::EdgeVector< VarType >::m_edges, Euclid::Histogram::BinStrategy< VarType >::m_nbins, and std::vector< T >::size().
|
default |
|
inlinefinalvirtual |
Get the two edges corresponding to the bin i
i | The bin index |
Reimplemented from Euclid::Histogram::BinStrategy< VarType >.
Definition at line 69 of file EdgeVector.h.
References Euclid::Histogram::Binning::EdgeVector< VarType >::m_edges, and std::make_pair().
|
inlinefinalvirtual |
Get the bin index corresponding to the given value
value | The value to map to a bin |
Implements Euclid::Histogram::BinStrategy< VarType >.
Definition at line 60 of file EdgeVector.h.
References std::vector< T >::back(), std::vector< T >::begin(), std::vector< T >::end(), std::find_if(), std::vector< T >::front(), and Euclid::Histogram::Binning::EdgeVector< VarType >::m_edges.
|
inlinefinalvirtual |
Get the edge value e. Note that there are always one more edge than bins: i.e. the bin 0 has the edges (0, 1), the bin 1 the edges (1, 2), etc...
Implements Euclid::Histogram::BinStrategy< VarType >.
Definition at line 73 of file EdgeVector.h.
References Euclid::Histogram::Binning::EdgeVector< VarType >::m_edges.
|
private |
Definition at line 79 of file EdgeVector.h.
Referenced by Euclid::Histogram::Binning::EdgeVector< VarType >::EdgeVector(), Euclid::Histogram::Binning::EdgeVector< VarType >::getBinEdges(), Euclid::Histogram::Binning::EdgeVector< VarType >::getBinIndex(), and Euclid::Histogram::Binning::EdgeVector< VarType >::getEdge().