CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
Combinatorics Class Reference

#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< UInt_t > &permutation)
 
void Print (const std::vector< std::vector< UInt_t > > &permutations)
 
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
 

Detailed Description

Definition at line 17 of file Combinatorics.h.

Constructor & Destructor Documentation

Combinatorics::Combinatorics ( Int_t  Set,
Int_t  Subset 
)

Definition at line 19 of file Combinatorics.cc.

Combinatorics::~Combinatorics ( )
virtual

Definition at line 32 of file Combinatorics.cc.

Member Function Documentation

Int_t Combinatorics::CalculatePermutations ( )
private

Definition at line 47 of file Combinatorics.cc.

Int_t Combinatorics::EqualPermutation ( const std::vector< UInt_t > &  permutation1,
const std::vector< UInt_t > &  permutation2 
)

Definition at line 214 of file Combinatorics.cc.

Int_t Combinatorics::EqualPermutation_2_0 ( const std::vector< UInt_t > &  permutation1,
const std::vector< UInt_t > &  permutation2 
)

Definition at line 351 of file Combinatorics.cc.

Int_t Combinatorics::EqualPermutation_2_2 ( const std::vector< UInt_t > &  permutation1,
const std::vector< UInt_t > &  permutation2 
)

Definition at line 373 of file Combinatorics.cc.

Int_t Combinatorics::EqualPermutation_N_1 ( const std::vector< UInt_t > &  permutation1,
const std::vector< UInt_t > &  permutation2 
)

Definition at line 398 of file Combinatorics.cc.

vector< vector< UInt_t > > Combinatorics::GetCombinations ( )

Definition at line 189 of file Combinatorics.cc.

vector< vector< UInt_t > > Combinatorics::GetCombinations_2_0 ( )

Definition at line 270 of file Combinatorics.cc.

vector< vector< UInt_t > > Combinatorics::GetCombinations_2_2 ( )

Definition at line 239 of file Combinatorics.cc.

vector< vector< UInt_t > > Combinatorics::GetCombinations_N_1 ( )

Definition at line 416 of file Combinatorics.cc.

vector< vector< UInt_t > > Combinatorics::GetPermutations ( )

Definition at line 39 of file Combinatorics.cc.

void Combinatorics::initial_permutation ( int  size,
int *  permutation 
)
private

Definition at line 85 of file Combinatorics.cc.

void Combinatorics::initial_subset ( int  k,
int *  subset 
)
private

Definition at line 97 of file Combinatorics.cc.

Bool_t Combinatorics::next_permutation ( int  size,
int *  permutation 
)
private

Definition at line 109 of file Combinatorics.cc.

Bool_t Combinatorics::next_subset ( int  n,
int  k,
int *  subset 
)
private

Definition at line 155 of file Combinatorics.cc.

void Combinatorics::Print ( const std::vector< UInt_t > &  permutation)

Definition at line 476 of file Combinatorics.cc.

void Combinatorics::Print ( const std::vector< std::vector< UInt_t > > &  permutations)

Definition at line 490 of file Combinatorics.cc.

vector< UInt_t > Combinatorics::Rotate ( const std::vector< UInt_t > &  permutation,
UInt_t  digits 
)
private

Definition at line 448 of file Combinatorics.cc.

void Combinatorics::Skip_2_0 ( const std::vector< std::vector< UInt_t > > &  permutation1,
std::vector< std::vector< UInt_t > > &  permutation2 
)
private

Definition at line 298 of file Combinatorics.cc.

void Combinatorics::Skip_2_2 ( const std::vector< std::vector< UInt_t > > &  permutation1,
std::vector< std::vector< UInt_t > > &  permutation2 
)
private

Definition at line 324 of file Combinatorics.cc.

Member Data Documentation

std::vector<std::vector <UInt_t> > Combinatorics::m_Combinations
private

Definition at line 64 of file Combinatorics.h.

std::vector<std::vector <UInt_t> > Combinatorics::m_Permutations
private

Definition at line 63 of file Combinatorics.h.

const Int_t Combinatorics::m_SetQuantity
private

Definition at line 59 of file Combinatorics.h.

std::vector<UInt_t> Combinatorics::m_Subset
private

Definition at line 62 of file Combinatorics.h.

const Int_t Combinatorics::m_SubsetQuantity
private

Definition at line 60 of file Combinatorics.h.