SNAP Library 4.0, Developer Reference  2017-07-27 13:18:06
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 2574 of file ds.h.

Constructor & Destructor Documentation

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

Definition at line 2578 of file ds.h.

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

Definition at line 2579 of file ds.h.

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

Definition at line 2580 of file ds.h.

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

Definition at line 2581 of file ds.h.

2581 : ValV(SIn){}
TVec< TVal > ValV
Definition: ds.h:2576

Member Function Documentation

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

Definition at line 2591 of file ds.h.

Referenced by TSnap::GetBetweennessCentr(), and TSnap::GetWeightedBetweennessCentr().

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

Here is the caller graph for this function:

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

Definition at line 2590 of file ds.h.

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

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

Here is the caller graph for this function:

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

Definition at line 2592 of file ds.h.

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

Definition at line 2593 of file ds.h.

Referenced by THttpLx::Len().

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

Here is the caller graph for this function:

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

Definition at line 2584 of file ds.h.

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

Definition at line 2586 of file ds.h.

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

Definition at line 2587 of file ds.h.

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

Definition at line 2588 of file ds.h.

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

Definition at line 2598 of file ds.h.

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

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

Here is the caller graph for this function:

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

Definition at line 2596 of file ds.h.

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

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

Here is the caller graph for this function:

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

Definition at line 2597 of file ds.h.

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

Definition at line 2582 of file ds.h.

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

Definition at line 2594 of file ds.h.

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

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

Here is the caller graph for this function:

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

Definition at line 2595 of file ds.h.

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

Member Data Documentation


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