![]() |
ATLAS Offline Software
|
Class to build pairs of XY values. More...
#include <PairBuilder.h>
Public Types | |
| typedef std::pair< int, int > | XYPair |
| typedef std::vector< XYPair > | PairVector |
| typedef std::set< int > | IntSet |
Public Member Functions | |
| PairBuilder () | |
| ~PairBuilder () | |
| void | inputx (const int xstrip) |
| Input a new x value. More... | |
| void | inputy (const int ystrip) |
| Input a new y value. More... | |
| void | inputxy (const int ystrip) |
| Input a new y value. More... | |
| int | numberOfPairs () const |
| Return the number of XY pairs made. More... | |
| const PairVector & | pairs () const |
| Return the pairs as a vector of pairs of integers. More... | |
| float | weight () const |
| Return the 'weight', = 1/(number of pairs) More... | |
| XYPair | pairAtIndex (const int indx) const |
| Return a specific XY pair at some vector index. More... | |
| int | xOfPairAt (const int indx) const |
| Return the X value of a specific pair. More... | |
| int | yOfPairAt (const int indx) const |
| Return the Y value of a specific pair. More... | |
Private Member Functions | |
Functions which form the pairs. | |
| void | formNewPairsWithX (const int xval) |
| void | formNewPairsWithY (const int yval) |
Private Attributes | |
Sets to hold x values and y values. | |
| IntSet | m_yvalues |
| IntSet | m_xvalues |
| use sets to avoid duplicate values More... | |
| PairVector | m_pairs |
| Vector to hold the pairs produced. More... | |
Class to build pairs of XY values.
Given a sequence of x and y integer values, PairBuilder will make all possible XY pairs and return the pairs in vector.
Definition at line 30 of file PairBuilder.h.
| typedef std::set<int> PairBuilder::IntSet |
Definition at line 37 of file PairBuilder.h.
| typedef std::vector< XYPair > PairBuilder::PairVector |
Definition at line 36 of file PairBuilder.h.
| typedef std::pair<int, int> PairBuilder::XYPair |
Definition at line 35 of file PairBuilder.h.
| PairBuilder::PairBuilder | ( | ) |
Definition at line 15 of file PairBuilder.cxx.
| PairBuilder::~PairBuilder | ( | ) |
Definition at line 18 of file PairBuilder.cxx.
|
private |
Definition at line 60 of file PairBuilder.cxx.
|
private |
Definition at line 66 of file PairBuilder.cxx.
| void PairBuilder::inputx | ( | const int | xstrip | ) |
| void PairBuilder::inputxy | ( | const int | ystrip | ) |
| void PairBuilder::inputy | ( | const int | ystrip | ) |
| int PairBuilder::numberOfPairs | ( | ) | const |
Return the number of XY pairs made.
Definition at line 39 of file PairBuilder.cxx.
| PairBuilder::XYPair PairBuilder::pairAtIndex | ( | const int | indx | ) | const |
Return a specific XY pair at some vector index.
Definition at line 48 of file PairBuilder.cxx.
| const PairBuilder::PairVector & PairBuilder::pairs | ( | ) | const |
Return the pairs as a vector of pairs of integers.
Definition at line 42 of file PairBuilder.cxx.
| float PairBuilder::weight | ( | ) | const |
Return the 'weight', = 1/(number of pairs)
Definition at line 45 of file PairBuilder.cxx.
| int PairBuilder::xOfPairAt | ( | const int | indx | ) | const |
Return the X value of a specific pair.
Definition at line 52 of file PairBuilder.cxx.
| int PairBuilder::yOfPairAt | ( | const int | indx | ) | const |
Return the Y value of a specific pair.
Definition at line 56 of file PairBuilder.cxx.
|
private |
Vector to hold the pairs produced.
Definition at line 66 of file PairBuilder.h.
|
private |
use sets to avoid duplicate values
Definition at line 63 of file PairBuilder.h.
|
private |
Definition at line 61 of file PairBuilder.h.
1.8.18