Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Experimental::RBinIndex Class Referencefinal

A bin index with special values for underflow and overflow bins.

Objects of this type should be passed by value.

Warning
This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!

Definition at line 22 of file RBinIndex.hxx.

Public Member Functions

 RBinIndex ()=default
 Construct an invalid bin index.
 
 RBinIndex (std::size_t index)
 Construct a bin index for a normal bin.
 
std::size_t GetIndex () const
 Return the index for a normal bin.
 
bool IsInvalid () const
 
bool IsNormal () const
 A bin index is normal iff it is not one of the special values.
 
bool IsOverflow () const
 
bool IsUnderflow () const
 
RBinIndex operator+ (std::size_t a) const
 
RBinIndexoperator++ ()
 
RBinIndex operator++ (int)
 
RBinIndexoperator+= (std::size_t a)
 
RBinIndex operator- (std::size_t a) const
 
RBinIndexoperator-- ()
 
RBinIndex operator-- (int)
 
RBinIndexoperator-= (std::size_t a)
 

Static Public Member Functions

static RBinIndex Overflow ()
 
static RBinIndex Underflow ()
 

Private Attributes

std::size_t fIndex = InvalidIndex
 

Static Private Attributes

static constexpr std::size_t InvalidIndex = -1
 
static constexpr std::size_t OverflowIndex = -2
 
static constexpr std::size_t UnderflowIndex = -3
 

Friends

bool operator!= (RBinIndex lhs, RBinIndex rhs)
 
bool operator< (RBinIndex lhs, RBinIndex rhs)
 
bool operator<= (RBinIndex lhs, RBinIndex rhs)
 
bool operator== (RBinIndex lhs, RBinIndex rhs)
 
bool operator> (RBinIndex lhs, RBinIndex rhs)
 
bool operator>= (RBinIndex lhs, RBinIndex rhs)
 

#include <ROOT/RBinIndex.hxx>

Constructor & Destructor Documentation

◆ RBinIndex() [1/2]

ROOT::Experimental::RBinIndex::RBinIndex ( )
default

Construct an invalid bin index.

◆ RBinIndex() [2/2]

ROOT::Experimental::RBinIndex::RBinIndex ( std::size_t index)
inline

Construct a bin index for a normal bin.

Definition at line 34 of file RBinIndex.hxx.

Member Function Documentation

◆ GetIndex()

std::size_t ROOT::Experimental::RBinIndex::GetIndex ( ) const
inline

Return the index for a normal bin.

Definition at line 37 of file RBinIndex.hxx.

◆ IsInvalid()

bool ROOT::Experimental::RBinIndex::IsInvalid ( ) const
inline

Definition at line 49 of file RBinIndex.hxx.

◆ IsNormal()

bool ROOT::Experimental::RBinIndex::IsNormal ( ) const
inline

A bin index is normal iff it is not one of the special values.

Note that a normal bin index may not actually be valid for a given axis if it is outside its range.

Definition at line 46 of file RBinIndex.hxx.

◆ IsOverflow()

bool ROOT::Experimental::RBinIndex::IsOverflow ( ) const
inline

Definition at line 48 of file RBinIndex.hxx.

◆ IsUnderflow()

bool ROOT::Experimental::RBinIndex::IsUnderflow ( ) const
inline

Definition at line 47 of file RBinIndex.hxx.

◆ operator+()

RBinIndex ROOT::Experimental::RBinIndex::operator+ ( std::size_t a) const
inline

Definition at line 67 of file RBinIndex.hxx.

◆ operator++() [1/2]

RBinIndex & ROOT::Experimental::RBinIndex::operator++ ( )
inline

Definition at line 74 of file RBinIndex.hxx.

◆ operator++() [2/2]

RBinIndex ROOT::Experimental::RBinIndex::operator++ ( int )
inline

Definition at line 80 of file RBinIndex.hxx.

◆ operator+=()

RBinIndex & ROOT::Experimental::RBinIndex::operator+= ( std::size_t a)
inline

Definition at line 51 of file RBinIndex.hxx.

◆ operator-()

RBinIndex ROOT::Experimental::RBinIndex::operator- ( std::size_t a) const
inline

Definition at line 101 of file RBinIndex.hxx.

◆ operator--() [1/2]

RBinIndex & ROOT::Experimental::RBinIndex::operator-- ( )
inline

Definition at line 108 of file RBinIndex.hxx.

◆ operator--() [2/2]

RBinIndex ROOT::Experimental::RBinIndex::operator-- ( int )
inline

Definition at line 114 of file RBinIndex.hxx.

◆ operator-=()

RBinIndex & ROOT::Experimental::RBinIndex::operator-= ( std::size_t a)
inline

Definition at line 87 of file RBinIndex.hxx.

◆ Overflow()

static RBinIndex ROOT::Experimental::RBinIndex::Overflow ( )
inlinestatic

Definition at line 149 of file RBinIndex.hxx.

◆ Underflow()

static RBinIndex ROOT::Experimental::RBinIndex::Underflow ( )
inlinestatic

Definition at line 142 of file RBinIndex.hxx.

Friends And Related Symbol Documentation

◆ operator!=

bool operator!= ( RBinIndex lhs,
RBinIndex rhs )
friend

Definition at line 122 of file RBinIndex.hxx.

◆ operator<

bool operator< ( RBinIndex lhs,
RBinIndex rhs )
friend

Definition at line 124 of file RBinIndex.hxx.

◆ operator<=

bool operator<= ( RBinIndex lhs,
RBinIndex rhs )
friend

Definition at line 131 of file RBinIndex.hxx.

◆ operator==

bool operator== ( RBinIndex lhs,
RBinIndex rhs )
friend

Definition at line 121 of file RBinIndex.hxx.

◆ operator>

bool operator> ( RBinIndex lhs,
RBinIndex rhs )
friend

Definition at line 133 of file RBinIndex.hxx.

◆ operator>=

bool operator>= ( RBinIndex lhs,
RBinIndex rhs )
friend

Definition at line 140 of file RBinIndex.hxx.

Member Data Documentation

◆ fIndex

std::size_t ROOT::Experimental::RBinIndex::fIndex = InvalidIndex
private

Definition at line 27 of file RBinIndex.hxx.

◆ InvalidIndex

constexpr std::size_t ROOT::Experimental::RBinIndex::InvalidIndex = -1
staticconstexprprivate

Definition at line 25 of file RBinIndex.hxx.

◆ OverflowIndex

constexpr std::size_t ROOT::Experimental::RBinIndex::OverflowIndex = -2
staticconstexprprivate

Definition at line 24 of file RBinIndex.hxx.

◆ UnderflowIndex

constexpr std::size_t ROOT::Experimental::RBinIndex::UnderflowIndex = -3
staticconstexprprivate

Definition at line 23 of file RBinIndex.hxx.

Libraries for ROOT::Experimental::RBinIndex:

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