|
User Documentation |
|
Centre for Vision, Speech & Signal Processing |
Comments:
This is a BIG object.
Mechanism suggested by G.Matas.
Variables:
Methods:
- RandomBagC(IntT Size = 0)
-
Constructor.
- RandomBagC(const SArray1dC<T> & data)
-
Construct from an array of data.
this assumes that all the entries in 'data'
are valid.
NB. This does NOT copy the data from the array
and will leave its contents is an unspecified
state.
- RandomBagC(const RandomBagC & Oth)
-
- ~RandomBagC()
-
Destructor
- const RandomBagC<T> & operator=(const RandomBagC & Oth)
-
Assignment.
- void Reset(IntT Size)
-
Empty pool and set to new size.
- BooleanT Insert(const T & Px)
-
Add new data to pool, returns false if pool is full.
- void Resize(SizeT nSize)
-
Change the size of the pool (Slow).
- T Pick(void)
-
Pick a data item at random from the pool.
NB. Only use if you know the pool is not
empty, this can be tested by IsElm().
- BooleanT IsEmpty() const
-
Is pool empty ?
- BooleanT IsElm() const
-
Does pool contain any data ?
- void Empty()
-
Empty it of all data.
- IntT Size() const
-
Number of elements in the pool.
|
Programmer:Charles Galambos, Documentation by CxxDoc: Tue Mar 20 10:48:08 2001
|