SNAP Library 2.1, Developer Reference  2013-09-25 10:47:25
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TSubGraphEnum< TGraphCounter >::TSVec Class Reference
Collaboration diagram for TSubGraphEnum< TGraphCounter >::TSVec:

List of all members.

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]

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.

{ 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_arr, and TSubGraphEnum< TGraphCounter >::TSVec::m_size.

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

                                                       {
                        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().

{ 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.

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

{ 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_arr, and TSubGraphEnum< TGraphCounter >::TSVec::m_size.

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

{ m_size--; m_arr[m_size]=-1; }

Here is the caller graph for this function:

template<class TGraphCounter >
void TSubGraphEnum< TGraphCounter >::TSVec::Push ( int  nodeId) [inline]
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().

{ return m_size; }

Here is the caller graph for this function:


Member Data Documentation

template<class TGraphCounter >
int TSubGraphEnum< TGraphCounter >::TSVec::m_capacity [protected]
template<class TGraphCounter >
TIntV TSubGraphEnum< TGraphCounter >::TSVec::m_v [protected]

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