|
COPASI API
4.40.278
|
#include <CPermutation.h>
Public Member Functions | |
| CPermutation (const CPermutation &src) | |
| CPermutation (CRandom *pRandom, const size_t &size) | |
| void | init () |
| const size_t & | next () |
| const size_t & | pick () |
| void | shuffle (const size_t &swaps=C_INVALID_INDEX) |
| ~CPermutation () | |
Private Member Functions | |
| CPermutation () | |
Private Attributes | |
| size_t * | mpBeyond |
| size_t * | mpNext |
| CRandom * | mpRandom |
| CVector< size_t > | mVector |
Static Private Attributes | |
| static size_t | InvalidIndex |
|
private |
Default constructor
| CPermutation::CPermutation | ( | CRandom * | pRandom, |
| const size_t & | size | ||
| ) |
| CPermutation::CPermutation | ( | const CPermutation & | src | ) |
Copy constructor
| const | CPermutation & src |
References CVectorCore< CType >::array(), mpBeyond, mpNext, mVector, and CVectorCore< CType >::size().
| CPermutation::~CPermutation | ( | ) |
Destructor
| void CPermutation::init | ( | ) |
Initialize the permutation
References CVectorCore< CType >::array(), mpBeyond, mpNext, mVector, and CVectorCore< CType >::size().
Referenced by CPermutation().
| const size_t & CPermutation::next | ( | ) |
Pick the next element
References InvalidIndex, mpBeyond, mpNext, mpRandom, mVector, and CVectorCore< CType >::size().
Referenced by COptMethodPS::buildInformants(), COptMethodDE::replicate(), COptMethodGA::replicate(), and COptMethodGASR::replicate().
| const size_t & CPermutation::pick | ( | ) |
Pick a random element
References CVectorCore< CType >::array(), CRandom::getRandomU(), InvalidIndex, mpNext, mpRandom, mVector, and CVectorCore< CType >::size().
Referenced by COptMethodPS::buildInformants(), and COptMethodDE::replicate().
| void CPermutation::shuffle | ( | const size_t & | swaps = C_INVALID_INDEX | ) |
Shuffle the permutation const size_t & swaps (Default: size of permutation)
References CVectorCore< CType >::array(), C_INT32, CRandom::getRandomU(), max, min, mpNext, mpRandom, mVector, and CVectorCore< CType >::size().
Referenced by COptMethodPS::buildInformants(), COptMethodDE::replicate(), COptMethodGA::replicate(), and COptMethodGASR::replicate().
|
private |
A pointer beyond the last index
Referenced by CPermutation(), init(), and next().
|
private |
A pointer to the next index
Referenced by CPermutation(), init(), next(), pick(), and shuffle().
|
private |
|
private |
A vector containing the permutation
Referenced by CPermutation(), init(), next(), pick(), and shuffle().