const T & operator[](const int &i) const
get the i-th element Assert in (i>-1) Assert in (i
Definition: STAT_Combinatorial.h:133
static UINT getCircularPermutationsNumber(const UINT &p, const UINT &n)
compute the number of circular permutations to take p elements among n n!/(p*(n-p)!) ...
Definition: STAT_Combinatorial.hpp:301
STAT_Combinatorial(void)
create an object
Definition: STAT_Combinatorial.hpp:23
void setIsDisplay(const tBoolean &b)
Definition: STAT_Combinatorial.h:190
static boost::shared_ptr< STAT_Combinatorial< T > > New()
return a STAT_Combinatorial shared pointer
Definition: STAT_Combinatorial.h:108
static void computeRandomPermutation(T *vect, const int &s)
permute all the values of vector of size s in an random order
Definition: STAT_Combinatorial.h:243
int computeCombinations(const int &p)
compute all combinations of size p
Definition: STAT_Combinatorial.hpp:204
static void initSeed()
init the seed for random computation
Definition: STAT_Combinatorial.h:182
int computeCircularPermutations(T *combinations, const int &p)
compute all circular permutations of size p combinations is assumed to have the size of getCircularPe...
Definition: STAT_Combinatorial.h:303
#define tBoolean
Definition: types.h:48
tBoolean onePermutationDone()
method called at each permutation done if return true succeeds
Definition: STAT_Combinatorial.h:331
int computePermutations(const int &p)
compute all permutations of size p
Definition: STAT_Combinatorial.hpp:220
#define null
Definition: types.h:13
UINT getCircularPermutationsNumber(const UINT &p)
compute the number of circular permutations to take p elements among n n!/(p*(n-p)!) ...
Definition: STAT_Combinatorial.h:233
static boost::shared_ptr< STAT_Combinatorial< T > > New(const int &n)
return a STAT_Combinatorial shared pointer
Definition: STAT_Combinatorial.h:116
TYPEDEF_SPTR(STAT_IntCombinatorial)
STAT_Combinatorial< int > STAT_IntCombinatorial
Definition: STAT_Combinatorial.h:375
virtual ~STAT_Combinatorial(void)
destroy an object.
Definition: STAT_Combinatorial.hpp:38
void initVector()
init the vector to index
Definition: STAT_Combinatorial.h:170
UINT getCombinationsNumber(const UINT &p)
compute the number of combinations to take p elements among n n!/(n-p)!*p!
Definition: STAT_Combinatorial.h:205
UINT getPermutationsNumber(const UINT &p)
compute the number of permutations to take p elements among n n!/(n-p)!
Definition: STAT_Combinatorial.h:220
static void computeRandomPermutation(T *vect, const int &s, const int &q)
permute all the values by block of size q of the vector of size s
Definition: STAT_Combinatorial.h:255
TYPEDEF_SVPTR(STAT_IntCombinatorial)
void setSize(const size_t &n)
resize
Definition: STAT_Combinatorial.h:163
void getSharedPointer(SP::CORE_Object &p)
get the shared pointer of this class into p
Definition: CORE_Object.h:65
static UINT getPermutationsNumber(const UINT &p, const UINT &n)
compute the number of permutations to take p elements among n n!/(n-p)!
Definition: STAT_Combinatorial.hpp:348
void resize(const size_t &n)
resize the vector & set the End index & the size
Definition: STAT_Combinatorial.h:150
abstract base class for most classes.
Definition: CORE_Object.h:30
This class is the class to generate combinations, permutation, etc...
Definition: STAT_Combinatorial.h:22
int computePermutations(T *cpermutations, const int &p)
compute all permutations of size p combinations is assumed to have the size of getPermutationsNumber(...
Definition: STAT_Combinatorial.h:289
static UINT getCombinationsNumber(const UINT &p, const UINT &n)
compute the number of combinations to take p elements among n n!/(n-p)!*p!
Definition: STAT_Combinatorial.hpp:367
void getSharedPointer(boost::shared_ptr< STAT_Combinatorial< T > > &p)
return the shared pointer corresponding to the class with casting
Definition: STAT_Combinatorial.h:74
tBoolean oneCombinationDone()
method called at each combination done if return true succeeds
Definition: STAT_Combinatorial.h:312
T & operator[](const int &i)
get the i-th element Assert in (i>-1) Assert in (i
Definition: STAT_Combinatorial.h:142
#define ASSERT_IN(a)
Definition: types.h:96
void getSharedPointer(boost::shared_ptr< const STAT_Combinatorial< T > > &p) const
return the shared pointer corresponding to the class whith casting
Definition: STAT_Combinatorial.h:81
int computeCircularPermutations(const int &p)
compute all circular permutations of size p
Definition: STAT_Combinatorial.hpp:233
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:106
#define tFlag
Definition: types.h:14