SNAP Library 6.0, Developer Reference  2020-12-09 16:24:20
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
TSubGraphEnum< TGraphCounter >::TSVec Class Reference
Collaboration diagram for TSubGraphEnum< TGraphCounter >::TSVec:

Public Member Functions

 TSVec (int capacity)
 
bool Contains (int nodeId) const
 
void Push (int nodeId)
 
void Pop ()
 
int Capacity () const
 
int Size () const
 
const TIntVgetVec () const
 
int operator[] (int i) const
 

Protected Attributes

int m_capacity
 
int m_size
 
int * m_arr
 
TIntV m_v
 

Detailed Description

template<class TGraphCounter>
class TSubGraphEnum< TGraphCounter >::TSVec

Definition at line 38 of file subgraphenum.h.

Constructor & Destructor Documentation

template<class TGraphCounter >
TSubGraphEnum< TGraphCounter >::TSVec::TSVec ( int  capacity)
inline

Definition at line 45 of file subgraphenum.h.

References TVec< TVal, TSizeTy >::BegI(), and TVec< TVal, TSizeTy >::Gen().

45  {
46  m_v.Gen(capacity); m_arr = (int *) m_v.BegI();
47  for(int i=0; i<capacity; i++) { m_arr[i]=-1; }
48  m_capacity = capacity; m_size = 0; }
TIter BegI() const
Returns an iterator pointing to the first element in the vector.
Definition: ds.h:593
void Gen(const TSizeTy &_Vals)
Constructs a vector (an array) of _Vals elements.
Definition: ds.h:523

Here is the call graph for this function:

Member Function Documentation

template<class TGraphCounter >
int TSubGraphEnum< TGraphCounter >::TSVec::Capacity ( ) const
inline

Definition at line 55 of file subgraphenum.h.

References TSubGraphEnum< TGraphCounter >::TSVec::m_capacity.

55 { return m_capacity; }
template<class TGraphCounter >
bool TSubGraphEnum< TGraphCounter >::TSVec::Contains ( int  nodeId) const
inline

Definition at line 50 of file subgraphenum.h.

References TSubGraphEnum< TGraphCounter >::TSVec::m_size.

Referenced by TSubGraphEnum< TGraphCounter >::GetSubGraphs_recursive().

50  {
51  for(int i=0; i<m_size; i++) { if(m_arr[i]==nodeId) return true; } return false; }

Here is the caller graph for this function:

template<class TGraphCounter >
const TIntV& TSubGraphEnum< TGraphCounter >::TSVec::getVec ( ) const
inline

Definition at line 57 of file subgraphenum.h.

References TSubGraphEnum< TGraphCounter >::TSVec::m_v.

Referenced by TSubGraphEnum< TGraphCounter >::GetSubGraphs_recursive().

57 { return m_v; }

Here is the caller graph for this function:

template<class TGraphCounter >
int TSubGraphEnum< TGraphCounter >::TSVec::operator[] ( int  i) const
inline

Definition at line 58 of file subgraphenum.h.

58 { return m_arr[i]; }
template<class TGraphCounter >
void TSubGraphEnum< TGraphCounter >::TSVec::Pop ( )
inline

Definition at line 54 of file subgraphenum.h.

References TSubGraphEnum< TGraphCounter >::TSVec::m_size.

Referenced by TSubGraphEnum< TGraphCounter >::GetSubGraphs_recursive().

Here is the caller graph for this function:

template<class TGraphCounter >
void TSubGraphEnum< TGraphCounter >::TSVec::Push ( int  nodeId)
inline

Definition at line 53 of file subgraphenum.h.

References TSubGraphEnum< TGraphCounter >::TSVec::m_size.

Referenced by TSubGraphEnum< TGraphCounter >::GetSubGraphs(), and TSubGraphEnum< TGraphCounter >::GetSubGraphs_recursive().

53 { m_arr[m_size]=nodeId; m_size++; }

Here is the caller graph for this function:

template<class TGraphCounter >
int TSubGraphEnum< TGraphCounter >::TSVec::Size ( ) const
inline

Definition at line 56 of file subgraphenum.h.

References TSubGraphEnum< TGraphCounter >::TSVec::m_size.

Referenced by TSubGraphEnum< TGraphCounter >::GetSubGraphs_recursive().

56 { return m_size; }

Here is the caller graph for this function:

Member Data Documentation

template<class TGraphCounter >
int* TSubGraphEnum< TGraphCounter >::TSVec::m_arr
protected

Definition at line 42 of file subgraphenum.h.

template<class TGraphCounter >
int TSubGraphEnum< TGraphCounter >::TSVec::m_capacity
protected

Definition at line 40 of file subgraphenum.h.

Referenced by TSubGraphEnum< TGraphCounter >::TSVec::Capacity().

template<class TGraphCounter >
TIntV TSubGraphEnum< TGraphCounter >::TSVec::m_v
protected

Definition at line 43 of file subgraphenum.h.

Referenced by TSubGraphEnum< TGraphCounter >::TSVec::getVec().


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