#include <MagBinFinders.h>
Public Member Functions | |
virtual int | binIndex (T R) const |
virtual int | binIndex (int i) const |
Returns an index in the valid range. | |
virtual T | binPosition (int ind) const |
The middle of the bin. | |
GeneralBinFinderInR () | |
GeneralBinFinderInR (std::vector< T > &borders) | |
Private Attributes | |
std::vector< T > | theBins |
std::vector< T > | theBorders |
int | theNbins |
Definition at line 29 of file MagBinFinders.h.
MagBinFinders::GeneralBinFinderInR< T >::GeneralBinFinderInR | ( | ) | [inline] |
Definition at line 32 of file MagBinFinders.h.
: theNbins(0) {}
MagBinFinders::GeneralBinFinderInR< T >::GeneralBinFinderInR | ( | std::vector< T > & | borders | ) | [inline] |
Definition at line 34 of file MagBinFinders.h.
: theNbins(borders.size()), theBorders(borders) { // FIXME: compute bin positions. // for (vector<T>::const_iterator i=theBorders.begin(); // i<theBorders.end(); ++i) { // theBorders.push_back(((*i) + (*(i+1))) / 2.); // cout << "GeneralBinFinderInR_ " << theNbins << " " << theBorders.size() << " " << (int) this << endl; }
virtual int MagBinFinders::GeneralBinFinderInR< T >::binIndex | ( | T | R | ) | const [inline, virtual] |
Returns an index in the valid range for the bin that contains AND is closest to R
Implements BaseBinFinder< T >.
Definition at line 68 of file MagBinFinders.h.
Referenced by MagBinFinders::GeneralBinFinderInR< double >::binIndex(), MagBinFinders::GeneralBinFinderInR< double >::binPosition(), and MagGeometry::findVolume().
virtual int MagBinFinders::GeneralBinFinderInR< T >::binIndex | ( | int | i | ) | const [inline, virtual] |
Returns an index in the valid range.
Implements BaseBinFinder< T >.
Definition at line 79 of file MagBinFinders.h.
virtual T MagBinFinders::GeneralBinFinderInR< T >::binPosition | ( | int | ind | ) | const [inline, virtual] |
The middle of the bin.
Implements BaseBinFinder< T >.
Definition at line 84 of file MagBinFinders.h.
std::vector<T> MagBinFinders::GeneralBinFinderInR< T >::theBins [private] |
Definition at line 92 of file MagBinFinders.h.
Referenced by MagBinFinders::GeneralBinFinderInR< double >::binPosition().
std::vector<T> MagBinFinders::GeneralBinFinderInR< T >::theBorders [private] |
Definition at line 91 of file MagBinFinders.h.
Referenced by MagBinFinders::GeneralBinFinderInR< double >::binIndex().
int MagBinFinders::GeneralBinFinderInR< T >::theNbins [private] |
Definition at line 90 of file MagBinFinders.h.
Referenced by MagBinFinders::GeneralBinFinderInR< double >::binIndex().