SNAP Library 2.2, User Reference  2014-03-11 19:15:55
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

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]

Definition at line 45 of file subgraphenum.h.

                                    {
                        m_v.Gen(capacity); m_arr = (int *) m_v.BegI();
      for(int i=0; i<capacity; i++) { m_arr[i]=-1; }
                        m_capacity = capacity; m_size = 0; }

Member Function Documentation

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

Definition at line 55 of file subgraphenum.h.

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

Definition at line 50 of file subgraphenum.h.

                                                       {
                        for(int i=0; i<m_size; i++) { if(m_arr[i]==nodeId) return true; } return false; }
template<class TGraphCounter >
const TIntV& TSubGraphEnum< TGraphCounter >::TSVec::getVec ( ) const [inline]

Definition at line 57 of file subgraphenum.h.

{ return m_v; }
template<class TGraphCounter >
int TSubGraphEnum< TGraphCounter >::TSVec::operator[] ( int  i) const [inline]

Definition at line 58 of file subgraphenum.h.

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

Definition at line 54 of file subgraphenum.h.

{ m_size--; m_arr[m_size]=-1; }
template<class TGraphCounter >
void TSubGraphEnum< TGraphCounter >::TSVec::Push ( int  nodeId) [inline]

Definition at line 53 of file subgraphenum.h.

{ m_arr[m_size]=nodeId; m_size++; }
template<class TGraphCounter >
int TSubGraphEnum< TGraphCounter >::TSVec::Size ( ) const [inline]

Definition at line 56 of file subgraphenum.h.

{ return m_size; }

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.

template<class TGraphCounter >
int TSubGraphEnum< TGraphCounter >::TSVec::m_size [protected]

Definition at line 41 of file subgraphenum.h.

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

Definition at line 43 of file subgraphenum.h.


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