#include <Combinatorics.h>
Public Member Functions | |
Combinatorics (Int_t Set, Int_t Subset) | |
Int_t | EqualPermutation (const std::vector< UInt_t > &permutation1, const std::vector< UInt_t > &permutation2) |
Int_t | EqualPermutation_2_0 (const std::vector< UInt_t > &permutation1, const std::vector< UInt_t > &permutation2) |
Int_t | EqualPermutation_2_2 (const std::vector< UInt_t > &permutation1, const std::vector< UInt_t > &permutation2) |
Int_t | EqualPermutation_N_1 (const std::vector< UInt_t > &permutation1, const std::vector< UInt_t > &permutation2) |
std::vector< std::vector< UInt_t > > | GetCombinations () |
std::vector< std::vector< UInt_t > > | GetCombinations_2_0 () |
std::vector< std::vector< UInt_t > > | GetCombinations_2_2 () |
std::vector< std::vector< UInt_t > > | GetCombinations_N_1 () |
std::vector< std::vector< UInt_t > > | GetPermutations () |
void | Print (const std::vector< std::vector< UInt_t > > &permutations) |
void | Print (const std::vector< UInt_t > &permutation) |
virtual | ~Combinatorics () |
Private Member Functions | |
Int_t | CalculatePermutations () |
void | initial_permutation (int size, int *permutation) |
void | initial_subset (int k, int *subset) |
Bool_t | next_permutation (int size, int *permutation) |
Bool_t | next_subset (int n, int k, int *subset) |
std::vector< UInt_t > | Rotate (const std::vector< UInt_t > &permutation, UInt_t digits) |
void | Skip_2_0 (const std::vector< std::vector< UInt_t > > &permutation1, std::vector< std::vector< UInt_t > > &permutation2) |
void | Skip_2_2 (const std::vector< std::vector< UInt_t > > &permutation1, std::vector< std::vector< UInt_t > > &permutation2) |
Private Attributes | |
std::vector< std::vector< UInt_t > > | m_Combinations |
std::vector< std::vector< UInt_t > > | m_Permutations |
const Int_t | m_SetQuantity |
std::vector< UInt_t > | m_Subset |
const Int_t | m_SubsetQuantity |
Definition at line 17 of file Combinatorics.h.
Combinatorics::Combinatorics | ( | Int_t | Set, |
Int_t | Subset | ||
) |
|
virtual |
Definition at line 31 of file Combinatorics.cc.
|
private |
Definition at line 41 of file Combinatorics.cc.
References mps_fire::i, initial_permutation(), initial_subset(), m_Permutations, m_SetQuantity, m_Subset, m_SubsetQuantity, next_permutation(), and next_subset().
Referenced by Combinatorics().
Int_t Combinatorics::EqualPermutation | ( | const std::vector< UInt_t > & | permutation1, |
const std::vector< UInt_t > & | permutation2 | ||
) |
Definition at line 179 of file Combinatorics.cc.
References mps_fire::i, p1, and p2.
Referenced by EqualPermutation_N_1(), and GetCombinations().
Int_t Combinatorics::EqualPermutation_2_0 | ( | const std::vector< UInt_t > & | permutation1, |
const std::vector< UInt_t > & | permutation2 | ||
) |
Definition at line 297 of file Combinatorics.cc.
Referenced by Skip_2_0().
Int_t Combinatorics::EqualPermutation_2_2 | ( | const std::vector< UInt_t > & | permutation1, |
const std::vector< UInt_t > & | permutation2 | ||
) |
Definition at line 315 of file Combinatorics.cc.
Referenced by Skip_2_2().
Int_t Combinatorics::EqualPermutation_N_1 | ( | const std::vector< UInt_t > & | permutation1, |
const std::vector< UInt_t > & | permutation2 | ||
) |
Definition at line 337 of file Combinatorics.cc.
References EqualPermutation(), p1, and p2.
vector< vector< UInt_t > > Combinatorics::GetCombinations | ( | ) |
Definition at line 159 of file Combinatorics.cc.
References EqualPermutation(), mps_fire::i, LogDebug, m_Combinations, and m_Permutations.
Referenced by Tau3MuReco::findCorrectPairing(), and GetCombinations_N_1().
vector< vector< UInt_t > > Combinatorics::GetCombinations_2_0 | ( | ) |
Definition at line 230 of file Combinatorics.cc.
References LogDebug, m_Permutations, m_SubsetQuantity, and Skip_2_0().
vector< vector< UInt_t > > Combinatorics::GetCombinations_2_2 | ( | ) |
Definition at line 203 of file Combinatorics.cc.
References LogDebug, m_Permutations, m_SubsetQuantity, and Skip_2_2().
vector< vector< UInt_t > > Combinatorics::GetCombinations_N_1 | ( | ) |
Definition at line 353 of file Combinatorics.cc.
References GetCombinations(), mps_fire::i, dqmiolumiharvest::j, LogDebug, m_Combinations, and Rotate().
vector< vector< UInt_t > > Combinatorics::GetPermutations | ( | ) |
|
private |
Definition at line 71 of file Combinatorics.cc.
References mps_fire::i, and findQualityFiles::size.
Referenced by CalculatePermutations().
|
private |
Definition at line 80 of file Combinatorics.cc.
References mps_fire::i, and dqmdumpme::k.
Referenced by CalculatePermutations().
|
private |
Definition at line 89 of file Combinatorics.cc.
References mps_fire::i, dqmiolumiharvest::j, dqmdumpme::k, findQualityFiles::size, and createJobs::tmp.
Referenced by CalculatePermutations().
|
private |
Definition at line 131 of file Combinatorics.cc.
References fileCollector::done, mps_fire::i, dqmiolumiharvest::j, dqmdumpme::k, and dqmiodumpmetadata::n.
Referenced by CalculatePermutations().
void Combinatorics::Print | ( | const std::vector< std::vector< UInt_t > > & | permutations | ) |
Definition at line 416 of file Combinatorics.cc.
References mps_fire::i, dqmiolumiharvest::j, LogDebug, AlCaHLTBitMon_ParallelJobs::p, and findQualityFiles::size.
void Combinatorics::Print | ( | const std::vector< UInt_t > & | permutation | ) |
Definition at line 405 of file Combinatorics.cc.
References mps_fire::i, LogDebug, and AlCaHLTBitMon_ParallelJobs::p.
|
private |
Definition at line 380 of file Combinatorics.cc.
References mps_fire::i, dqmiolumiharvest::j, dqmdumpme::k, AlCaHLTBitMon_ParallelJobs::p, and createJobs::tmp.
Referenced by GetCombinations_N_1().
|
private |
Definition at line 254 of file Combinatorics.cc.
References EqualPermutation_2_0(), mps_fire::i, dqmiolumiharvest::j, p1, and p2.
Referenced by GetCombinations_2_0().
|
private |
Definition at line 275 of file Combinatorics.cc.
References EqualPermutation_2_2(), mps_fire::i, dqmiolumiharvest::j, p1, and p2.
Referenced by GetCombinations_2_2().
|
private |
Definition at line 54 of file Combinatorics.h.
Referenced by GetCombinations(), and GetCombinations_N_1().
|
private |
Definition at line 53 of file Combinatorics.h.
Referenced by CalculatePermutations(), GetCombinations(), GetCombinations_2_0(), GetCombinations_2_2(), and GetPermutations().
|
private |
Definition at line 49 of file Combinatorics.h.
Referenced by CalculatePermutations().
|
private |
Definition at line 52 of file Combinatorics.h.
Referenced by CalculatePermutations().
|
private |
Definition at line 50 of file Combinatorics.h.
Referenced by CalculatePermutations(), GetCombinations_2_0(), and GetCombinations_2_2().