SNAP Library, User Reference  2012-10-02 12:56:23
SNAP, a general purpose network analysis and graph mining library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TSnapQueue< TVal > Class Template Reference

List of all members.

Public Member Functions

 TSnapQueue ()
 TSnapQueue (const int &MxVals)
 Constructor that reserves enough memory for a queue with MxVals elements.
 TSnapQueue (const int &MxVals, const int &MaxFirst)
 TSnapQueue (const TSnapQueue &Queue)
 TSnapQueue (TSIn &SIn)
 Constructor that loads the queue from a (binary) stream SIn.
void Save (TSOut &SOut) const
 Saves the queue to a (binary) stream SOut.
TSnapQueueoperator= (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.
void Clr (const bool &DoDel=true)
 Deletes all elements from the queue.
void Gen (const int &MxVals, const int &MaxFirst=1024)
bool Empty () const
 Tests whether the queue is empty (contains no elements).
int Len () const
 Returns the number of elements in the queue.
int GetFirst () const
 Returns the location of the first element in the queue.
int GetLast () const
 Returns the location of the last element in the queue.
int Reserved () const
const TVal & Top () const
 Returns the value of the first element in the queue, but does not remove the element.
void Pop ()
 Removes the first element from the queue.
void Push (const TVal &Val)
 Adds an element at the end of the queue.

Detailed Description

template<class TVal>
class TSnapQueue< TVal >

Fast Queue used by the TBreathFS (uses memcpy to move objects TVal around).


Constructor & Destructor Documentation

template<class TVal>
TSnapQueue< TVal >::TSnapQueue ( ) [inline]
template<class TVal>
TSnapQueue< TVal >::TSnapQueue ( const int &  MxVals) [inline]

Constructor that reserves enough memory for a queue with MxVals elements.

template<class TVal>
TSnapQueue< TVal >::TSnapQueue ( const int &  MxVals,
const int &  MaxFirst 
) [inline]
template<class TVal>
TSnapQueue< TVal >::TSnapQueue ( const TSnapQueue< TVal > &  Queue) [inline]
template<class TVal>
TSnapQueue< TVal >::TSnapQueue ( TSIn SIn) [inline, explicit]

Constructor that loads the queue from a (binary) stream SIn.


Member Function Documentation

template<class TVal>
void TSnapQueue< TVal >::Clr ( const bool &  DoDel = true) [inline]

Deletes all elements from the queue.

template<class TVal>
bool TSnapQueue< TVal >::Empty ( ) const [inline]

Tests whether the queue is empty (contains no elements).

template<class TVal>
void TSnapQueue< TVal >::Gen ( const int &  MxVals,
const int &  MaxFirst = 1024 
) [inline]
template<class TVal>
int TSnapQueue< TVal >::GetFirst ( ) const [inline]

Returns the location of the first element in the queue.

template<class TVal>
int TSnapQueue< TVal >::GetLast ( ) const [inline]

Returns the location of the last element in the queue.

template<class TVal>
int TSnapQueue< TVal >::Len ( ) const [inline]

Returns the number of elements in the queue.

template<class TVal>
TSnapQueue& TSnapQueue< TVal >::operator= ( const TSnapQueue< TVal > &  Queue) [inline]
template<class TVal>
const TVal& TSnapQueue< TVal >::operator[] ( const int &  ValN) const [inline]

Returns the value of the ValN element in the queue, but does not remove the element.

template<class TVal>
void TSnapQueue< TVal >::Pop ( ) [inline]

Removes the first element from the queue.

template<class TVal>
void TSnapQueue< TVal >::Push ( const TVal &  Val) [inline]

Adds an element at the end of the queue.

template<class TVal>
int TSnapQueue< TVal >::Reserved ( ) const [inline]
template<class TVal>
void TSnapQueue< TVal >::Save ( TSOut SOut) const [inline]

Saves the queue to a (binary) stream SOut.

template<class TVal>
const TVal& TSnapQueue< TVal >::Top ( ) const [inline]

Returns the value of the first element in the queue, but does not remove the element.


The documentation for this class was generated from the following file: