|
| TSnapQueue () |
|
| TSnapQueue (const int &MxVals) |
| Constructor that reserves enough memory for a queue with MxVals elements. More...
|
|
| TSnapQueue (const int &MxVals, const int &MaxFirst) |
|
| TSnapQueue (const TSnapQueue &Queue) |
|
| TSnapQueue (TSIn &SIn) |
| Constructor that loads the queue from a (binary) stream SIn. More...
|
|
void | Save (TSOut &SOut) const |
| Saves the queue to a (binary) stream SOut. More...
|
|
TSnapQueue & | operator= (const TSnapQueue &Queue) |
|
const TVal & | operator[] (const int &ValN) const |
| Returns the value of the ValN element in the queue, but does not remove the element. More...
|
|
void | Sample (const int num, TRnd &Rnd=TInt::Rnd) |
|
void | Clr (const bool &DoDel=true) |
| Deletes all elements from the queue. More...
|
|
void | Gen (const int &MxVals, const int &MaxFirst=1024) |
|
bool | Empty () const |
| Tests whether the queue is empty (contains no elements). More...
|
|
int | Len () const |
| Returns the number of elements in the queue. More...
|
|
int | GetFirst () const |
| Returns the location of the first element in the queue. More...
|
|
int | GetLast () const |
| Returns the location of the last element in the queue. More...
|
|
int | Reserved () const |
|
const TVal & | Top () const |
| Returns the value of the first element in the queue, but does not remove the element. More...
|
|
void | Pop () |
| Removes the first element from the queue. More...
|
|
void | Push (const TVal &Val) |
| Adds an element at the end of the queue. More...
|
|
template<class TVal>
class TSnapQueue< TVal >
Fast Queue used by the TBreathFS
(uses memcpy
to move objects TVal
around).
Definition at line 158 of file gbase.h.
Adds an element at the end of the queue.
Definition at line 214 of file gbase.h.
Referenced by TSnap::CascFind(), TSnap::CascFindMP(), MAPPR::computeAPPR(), TSnap::GetEgonetAttr(), TSnap::GetEgonetHop(), TSnap::GetInEgonetAttr(), TSnap::GetInEgonetHop(), TSnap::GetInEgonetSub(), TSnap::GetInEgonetSubAttr(), TSnap::GetNodeWcc(), TSnap::GetOutEgonetAttr(), TSnap::GetOutEgonetHop(), TSnap::GetTreeSig(), and TSnap::IsWeaklyConn().
TSizeTy Reserved() const
Returns the size of allocated storage capacity.
void Del(const TSizeTy &ValN)
Removes the element at position ValN.
TSizeTy Len() const
Returns the number of elements in the vector.
bool Empty() const
Tests whether the vector is empty.
int Len() const
Returns the number of elements in the queue.
TIter BegI() const
Returns an iterator pointing to the first element in the vector.
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
TIter GetI(const TSizeTy &ValN) const
Returns an iterator an element at position ValN.