SNAP Library 2.3, Developer Reference  2014-06-16 11:58:46
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TSStack< TVal > Class Template Reference

#include <ds.h>

Collaboration diagram for TSStack< TVal >:

Public Member Functions

 TSStack ()
 
 TSStack (const int &MxVals)
 
 TSStack (const TSStack &Stack)
 
 TSStack (TSIn &SIn)
 
void Save (TSOut &SOut) const
 
TSStackoperator= (const TSStack &Stack)
 
bool operator== (const TSStack &Stack) const
 
const TVal & operator[] (const int &ValN) const
 
TVal & operator[] (const int &ValN)
 
bool Empty ()
 
void Clr (const bool &DoDel=false)
 
bool IsIn (const TVal &Val) const
 
int Len ()
 
TVal & Top ()
 
const TVal & Top () const
 
void Push ()
 
void Push (const TVal &Val)
 
void Pop ()
 

Private Attributes

TVec< TVal > ValV
 

Detailed Description

template<class TVal>
class TSStack< TVal >

Definition at line 3452 of file ds.h.

Constructor & Destructor Documentation

template<class TVal>
TSStack< TVal >::TSStack ( )
inline

Definition at line 3456 of file ds.h.

3456 : ValV(){}
TVec< TVal > ValV
Definition: ds.h:3454
template<class TVal>
TSStack< TVal >::TSStack ( const int &  MxVals)
inline

Definition at line 3457 of file ds.h.

3457 : ValV(MxVals, 0){}
TVec< TVal > ValV
Definition: ds.h:3454
template<class TVal>
TSStack< TVal >::TSStack ( const TSStack< TVal > &  Stack)
inline

Definition at line 3458 of file ds.h.

3458 : ValV(Stack.ValV){}
TVec< TVal > ValV
Definition: ds.h:3454
template<class TVal>
TSStack< TVal >::TSStack ( TSIn SIn)
inlineexplicit

Definition at line 3459 of file ds.h.

3459 : ValV(SIn){}
TVec< TVal > ValV
Definition: ds.h:3454

Member Function Documentation

template<class TVal>
void TSStack< TVal >::Clr ( const bool &  DoDel = false)
inline

Definition at line 3469 of file ds.h.

Referenced by TSnap::GetBetweennessCentr().

3469 {ValV.Clr(DoDel);}
void Clr(const bool &DoDel=true, const TSizeTy &NoDelLim=-1)
Clears the contents of the vector.
Definition: ds.h:953
TVec< TVal > ValV
Definition: ds.h:3454

Here is the caller graph for this function:

template<class TVal>
bool TSStack< TVal >::Empty ( )
inline

Definition at line 3468 of file ds.h.

Referenced by TSnap::GetBetweennessCentr(), THttpLx::GetCh(), TCnCom::GetDfsVisitor(), THttpLx::GetRest(), TILx::GetSIn(), TILx::GetSym(), and TILx::PeekSym().

3468 {return ValV.Len()==0;}
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:535
TVec< TVal > ValV
Definition: ds.h:3454

Here is the caller graph for this function:

template<class TVal>
bool TSStack< TVal >::IsIn ( const TVal &  Val) const
inline

Definition at line 3470 of file ds.h.

3470 {return ValV.IsIn(Val);}
bool IsIn(const TVal &Val) const
Checks whether element Val is a member of the vector.
Definition: ds.h:782
TVec< TVal > ValV
Definition: ds.h:3454
template<class TVal>
int TSStack< TVal >::Len ( )
inline

Definition at line 3471 of file ds.h.

Referenced by THttpLx::Len().

3471 {return ValV.Len();}
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:535
TVec< TVal > ValV
Definition: ds.h:3454

Here is the caller graph for this function:

template<class TVal>
TSStack& TSStack< TVal >::operator= ( const TSStack< TVal > &  Stack)
inline

Definition at line 3462 of file ds.h.

3462  {
3463  if (this!=&Stack){ValV=Stack.ValV;} return *this;}
TVec< TVal > ValV
Definition: ds.h:3454
template<class TVal>
bool TSStack< TVal >::operator== ( const TSStack< TVal > &  Stack) const
inline

Definition at line 3464 of file ds.h.

3464 {return this==&Stack;}
template<class TVal>
const TVal& TSStack< TVal >::operator[] ( const int &  ValN) const
inline

Definition at line 3465 of file ds.h.

3465 {return ValV[ValV.Len()-ValN-1];}
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:535
TVec< TVal > ValV
Definition: ds.h:3454
template<class TVal>
TVal& TSStack< TVal >::operator[] ( const int &  ValN)
inline

Definition at line 3466 of file ds.h.

3466 {return ValV[ValV.Len()-ValN-1];}
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:535
TVec< TVal > ValV
Definition: ds.h:3454
template<class TVal>
void TSStack< TVal >::Pop ( )
inline

Definition at line 3476 of file ds.h.

Referenced by TSccVisitor< PGraph, OnlyCount >::FinishNode(), TSnap::GetBetweennessCentr(), THttpLx::GetCh(), TCnCom::GetDfsVisitor(), TILx::GetSym(), and TILx::PeekSym().

3476 {Assert(0<ValV.Len()); ValV.DelLast();}
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:535
#define Assert(Cond)
Definition: bd.h:251
void DelLast()
Removes the last element of the vector.
Definition: ds.h:609
TVec< TVal > ValV
Definition: ds.h:3454

Here is the caller graph for this function:

template<class TVal>
void TSStack< TVal >::Push ( )
inline

Definition at line 3474 of file ds.h.

Referenced by TSccVisitor< PGraph, OnlyCount >::DiscoverNode(), TSnap::GetBetweennessCentr(), TCnCom::GetDfsVisitor(), TILx::PeekSym(), THttpLx::PutCh(), and TILx::PutSym().

3474 {ValV.Add();}
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
Definition: ds.h:559
TVec< TVal > ValV
Definition: ds.h:3454

Here is the caller graph for this function:

template<class TVal>
void TSStack< TVal >::Push ( const TVal &  Val)
inline

Definition at line 3475 of file ds.h.

3475 {ValV.Add(Val);}
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
Definition: ds.h:559
TVec< TVal > ValV
Definition: ds.h:3454
template<class TVal>
void TSStack< TVal >::Save ( TSOut SOut) const
inline

Definition at line 3460 of file ds.h.

3460 {ValV.Save(SOut);}
void Save(TSOut &SOut) const
Definition: ds.h:885
TVec< TVal > ValV
Definition: ds.h:3454
template<class TVal>
TVal& TSStack< TVal >::Top ( )
inline

Definition at line 3472 of file ds.h.

Referenced by TSccVisitor< PGraph, OnlyCount >::FinishNode(), TSnap::GetBetweennessCentr(), THttpLx::GetCh(), TCnCom::GetDfsVisitor(), TILx::GetSym(), and TILx::PeekSym().

3472 {Assert(0<ValV.Len()); return ValV.Last();}
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:535
#define Assert(Cond)
Definition: bd.h:251
const TVal & Last() const
Returns a reference to the last element of the vector.
Definition: ds.h:539
TVec< TVal > ValV
Definition: ds.h:3454

Here is the caller graph for this function:

template<class TVal>
const TVal& TSStack< TVal >::Top ( ) const
inline

Definition at line 3473 of file ds.h.

3473 {Assert(0<ValV.Len()); return ValV.Last();}
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:535
#define Assert(Cond)
Definition: bd.h:251
const TVal & Last() const
Returns a reference to the last element of the vector.
Definition: ds.h:539
TVec< TVal > ValV
Definition: ds.h:3454

Member Data Documentation


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