![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
51 throw std::runtime_error(Form(
"File: %s, Line: %d\nCombination::init() - error, class number greater than number of elements!", __FILE__, __LINE__));
109 int ncomb = TMath::Binomial(
m_n,
m_k);
126 std::vector<unsigned int> & index_array)
const {
128 if (index_array.size()<
m_k) {
129 index_array = std::vector<unsigned int>(
m_k);
131 for (
unsigned int j=0; j<
m_k; j++) {
157 if (index_array.size()<
m_k) {
158 index_array = std::vector<unsigned int>(
m_k);
165 for (
unsigned int j=0; j<
m_k; j++) {
176 for (
unsigned int j=1; j<
m_k; j++) {
179 for (
unsigned int l=j;
l<
m_k;
l++) {
189 for (
unsigned int j=0; j<
m_k; j++) {
215 for (
unsigned int j=0; j<
m_k; j++) {
231 const unsigned int & wh_class) {
233 init(nb_elements, wh_class);
unsigned int whichClass(void) const
get the class of which the combination is
unsigned int numberOfCombinations(void) const
get the number of combinations
Combination(void)
Default construcor. A combination of 1 out of 1 is created.
void currentCombination(std::vector< unsigned int > &index_array) const
get the current combination; the result is stored in the vector index_array
void setNewParameters(const unsigned int &nb_elements, const unsigned int &wh_class)
set the number of elements = nb_elements; set the class of which the combination is = wh_class
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
void reset(void)
go back to the first combination
std::vector< unsigned int > m_index
std::vector< unsigned int > m_flag
void nextCombination(std::vector< unsigned int > &index_array)
get the next combination; the results is stored in the array index_array
void init(const unsigned int &n, const unsigned int &k)
unsigned int numberOfElements(void) const
get the number of elements