SNAP Library, User Reference  2012-10-02 12:56:23
SNAP, a general purpose network analysis and graph mining library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TBigNet< TNodeData, IsDir > Class Template Reference

List of all members.

Classes

class  TEdgeI
class  TNode
class  TNodeI

Public Types

enum  { DelNId = INT_MAX }
typedef TNodeData TNodeDat
typedef TBigNet< TNodeData, IsDirTNet
typedef TPt< TNetPNet
typedef THash< TInt, TNodeTNodeH
typedef TPt< TBigNet
< TNodeData, IsDir > > 
PBigNet
typedef TVecPool< TIntTPool
typedef TPt< TPoolPPool

Public Member Functions

 TBigNet (const int &Nodes, const TSize &Edges, const bool &Sources=false)
 TBigNet (TSIn &SIn)
virtual ~TBigNet ()
virtual void Save (TSOut &SOut) const
TBigNetoperator= (const TBigNet &Net)
bool OnlySources () const
bool HasFlag (const TGraphFlag &Flag) const
void DumpFlags () const
int GetNodes () const
int GetMxNId () const
int AddNode (int NId, const int &InDeg, const int &OutDeg)
int AddNode (int NId, const int &InDeg, const int &OutDeg, const TNodeDat &NodeDat)
int AddNode (int NId, const TIntV &InNIdV, const TIntV &OutNIdV)
int AddNode (int NId, const TIntV &InNIdV, const TIntV &OutNIdV, const TNodeDat &NodeDat)
int AddUndirNode (int NId, const int &Deg)
int AddUndirNode (int NId, const int &Deg, const TNodeDat &NodeDat)
int AddUndirNode (int NId, const TIntV &EdgeNIdV)
int AddUndirNode (int NId, const TIntV &EdgeNIdV, const TNodeDat &NodeDat)
void SetInNIdV (int NId, const TIntV &InNIdV)
void SetOutNIdV (int NId, const TIntV &OutNIdV)
void GetInNIdV (int NId, TIntV &OutNIdV) const
void GetOutNIdV (int NId, TIntV &OutNIdV) const
bool IsNode (const int &NId) const
TNodeI BegNI () const
TNodeI EndNI () const
TNodeI GetNI (const int &NId) const
TNodeDatGetNDat (const int &NId)
const TNodeDatGetNDat (const int &NId) const
TEdgeI BegEI () const
TEdgeI EndEI () const
TEdgeI GetEI (const int &EId) const
int IsolateNode (int NId)
int DelNode (int NId)
bool IsIsoNode (const int &NId) const
uint GetDelEdges ()
void CompactEdgePool ()
::TSize GetEdges () const
int AddEdge (const int &SrcNId, const int &DstNId)
bool IsEdge (const int &SrcNId, const int &DstNId, const bool &Dir=true) const
void SortEdgeV ()
void InvertFromSources (uint ExpectNodes=0)
void Rewire (TRnd &Rnd=TInt::Rnd)
PNGraph GetNGraph (const bool &RenumberNodes=false) const
PNGraph GetSubNGraph (const TIntV &NIdV) const
PBigNet GetSubGraph (const TIntV &NIdV, const bool &RenumberNodes=false) const
void GetSubGraph (const TIntV &NIdV, TBigNet *NewNet, const bool &RenumberNodes=false) const
int GetRndNId (TRnd &Rnd=TInt::Rnd) const
TNodeI GetRndNI (TRnd &Rnd=TInt::Rnd) const
void GetNIdV (TIntV &NIdV) const
bool Empty () const
void Clr (const bool &DoDel=true)
void Reserve (const int &Nodes, const TSize &Edges)
void Defrag (const bool &OnlyNodeLinks=false)
bool IsOk () const
void Dump (const TStr &Desc=TStr()) const
void SaveForDisk (const TStr &OutFNm) const

Static Public Member Functions

static PBigNet New (const int &Nodes, const TSize &Edges, const bool &Sources=false)
static PBigNet Load (TSIn &SIn)
static void LoadNodeDatH (const TStr &InFNm, TNodeH &NodeH)
static void SaveToDisk (const TStr &InFNm, const TStr &OutFNm, const bool &SaveSparseHash)

Protected Member Functions

bool IsNode (const int &NId, TNode &Node) const
int * GetInNIdVPt (const int &NId) const
int * GetOutNIdVPt (const int &NId) const
const TNodeGetNode (const int &NId) const
TNodeGetNode (const int &NId)

Static Protected Member Functions

static void AddSorted (int *Beg, int *End, const int &Val)
static const int * BinSearch (const int *Beg, const int *End, const int &Val)
static const int * BinSearch2 (const int *Beg, const int *End, const int &Val)

Protected Attributes

TCRef CRef
TInt MxNId
TB32Set Flags
TPool Pool
TNodeH NodeH

Friends

class TPt< TBigNet >

template<class TNodeData, bool IsDir>
class TBigNet< TNodeData, IsDir >


Member Typedef Documentation

template<class TNodeData, bool IsDir>
typedef TPt<TBigNet<TNodeData, IsDir> > TBigNet< TNodeData, IsDir >::PBigNet
template<class TNodeData, bool IsDir>
typedef TPt<TNet> TBigNet< TNodeData, IsDir >::PNet
template<class TNodeData, bool IsDir>
typedef TPt<TPool> TBigNet< TNodeData, IsDir >::PPool
template<class TNodeData, bool IsDir>
typedef TBigNet<TNodeData, IsDir> TBigNet< TNodeData, IsDir >::TNet
template<class TNodeData, bool IsDir>
typedef TNodeData TBigNet< TNodeData, IsDir >::TNodeDat
template<class TNodeData, bool IsDir>
typedef THash<TInt, TNode> TBigNet< TNodeData, IsDir >::TNodeH
template<class TNodeData, bool IsDir>
typedef TVecPool<TInt> TBigNet< TNodeData, IsDir >::TPool

Member Enumeration Documentation

template<class TNodeData, bool IsDir>
anonymous enum
Enumerator:
DelNId 

Constructor & Destructor Documentation

template<class TNodeData , bool IsDir>
TBigNet< TNodeData, IsDir >::TBigNet ( const int &  Nodes,
const TSize Edges,
const bool &  Sources = false 
)
template<class TNodeData, bool IsDir>
TBigNet< TNodeData, IsDir >::TBigNet ( TSIn SIn) [inline]
template<class TNodeData, bool IsDir>
virtual TBigNet< TNodeData, IsDir >::~TBigNet ( ) [inline, virtual]

Member Function Documentation

template<class TNodeData , bool IsDir>
int TBigNet< TNodeData, IsDir >::AddEdge ( const int &  SrcNId,
const int &  DstNId 
)
template<class TNodeData , bool IsDir>
int TBigNet< TNodeData, IsDir >::AddNode ( int  NId,
const int &  InDeg,
const int &  OutDeg 
)
template<class TNodeData , bool IsDir>
int TBigNet< TNodeData, IsDir >::AddNode ( int  NId,
const int &  InDeg,
const int &  OutDeg,
const TNodeDat NodeDat 
)
template<class TNodeData , bool IsDir>
int TBigNet< TNodeData, IsDir >::AddNode ( int  NId,
const TIntV InNIdV,
const TIntV OutNIdV 
)
template<class TNodeData , bool IsDir>
int TBigNet< TNodeData, IsDir >::AddNode ( int  NId,
const TIntV InNIdV,
const TIntV OutNIdV,
const TNodeDat NodeDat 
)
template<class TNodeData , bool IsDir>
void TBigNet< TNodeData, IsDir >::AddSorted ( int *  Beg,
int *  End,
const int &  Val 
) [static, protected]
template<class TNodeData , bool IsDir>
int TBigNet< TNodeData, IsDir >::AddUndirNode ( int  NId,
const int &  Deg 
)
template<class TNodeData , bool IsDir>
int TBigNet< TNodeData, IsDir >::AddUndirNode ( int  NId,
const int &  Deg,
const TNodeDat NodeDat 
)
template<class TNodeData , bool IsDir>
int TBigNet< TNodeData, IsDir >::AddUndirNode ( int  NId,
const TIntV EdgeNIdV 
)
template<class TNodeData , bool IsDir>
int TBigNet< TNodeData, IsDir >::AddUndirNode ( int  NId,
const TIntV EdgeNIdV,
const TNodeDat NodeDat 
)
template<class TNodeData, bool IsDir>
TEdgeI TBigNet< TNodeData, IsDir >::BegEI ( ) const [inline]
template<class TNodeData, bool IsDir>
TNodeI TBigNet< TNodeData, IsDir >::BegNI ( ) const [inline]
template<class TNodeData , bool IsDir>
const int * TBigNet< TNodeData, IsDir >::BinSearch ( const int *  Beg,
const int *  End,
const int &  Val 
) [static, protected]
template<class TNodeData , bool IsDir>
const int * TBigNet< TNodeData, IsDir >::BinSearch2 ( const int *  Beg,
const int *  End,
const int &  Val 
) [static, protected]
template<class TNodeData, bool IsDir>
void TBigNet< TNodeData, IsDir >::Clr ( const bool &  DoDel = true) [inline]
template<class TNodeData , bool IsDir>
void TBigNet< TNodeData, IsDir >::CompactEdgePool ( )
template<class TNodeData, bool IsDir>
void TBigNet< TNodeData, IsDir >::Defrag ( const bool &  OnlyNodeLinks = false) [inline]
template<class TNodeData , bool IsDir>
int TBigNet< TNodeData, IsDir >::DelNode ( int  NId)
template<class TNodeData , bool IsDir>
void TBigNet< TNodeData, IsDir >::Dump ( const TStr Desc = TStr()) const
template<class TNodeData , bool IsDir>
void TBigNet< TNodeData, IsDir >::DumpFlags ( ) const
template<class TNodeData, bool IsDir>
bool TBigNet< TNodeData, IsDir >::Empty ( ) const [inline]
template<class TNodeData, bool IsDir>
TEdgeI TBigNet< TNodeData, IsDir >::EndEI ( ) const [inline]
template<class TNodeData, bool IsDir>
TNodeI TBigNet< TNodeData, IsDir >::EndNI ( ) const [inline]
template<class TNodeData , bool IsDir>
uint TBigNet< TNodeData, IsDir >::GetDelEdges ( )
template<class TNodeData, bool IsDir>
::TSize TBigNet< TNodeData, IsDir >::GetEdges ( ) const [inline]
template<class TNodeData, bool IsDir>
TEdgeI TBigNet< TNodeData, IsDir >::GetEI ( const int &  EId) const
template<class TNodeData , bool IsDir>
void TBigNet< TNodeData, IsDir >::GetInNIdV ( int  NId,
TIntV OutNIdV 
) const
template<class TNodeData, bool IsDir>
int* TBigNet< TNodeData, IsDir >::GetInNIdVPt ( const int &  NId) const [inline, protected]
template<class TNodeData, bool IsDir>
int TBigNet< TNodeData, IsDir >::GetMxNId ( ) const [inline]
template<class TNodeData, bool IsDir>
TNodeDat& TBigNet< TNodeData, IsDir >::GetNDat ( const int &  NId) [inline]
template<class TNodeData, bool IsDir>
const TNodeDat& TBigNet< TNodeData, IsDir >::GetNDat ( const int &  NId) const [inline]
template<class TNodeData , bool IsDir>
PNGraph TBigNet< TNodeData, IsDir >::GetNGraph ( const bool &  RenumberNodes = false) const
template<class TNodeData, bool IsDir>
TNodeI TBigNet< TNodeData, IsDir >::GetNI ( const int &  NId) const [inline]
template<class TNodeData , bool IsDir>
void TBigNet< TNodeData, IsDir >::GetNIdV ( TIntV NIdV) const
template<class TNodeData, bool IsDir>
const TNode& TBigNet< TNodeData, IsDir >::GetNode ( const int &  NId) const [inline, protected]
template<class TNodeData, bool IsDir>
TNode& TBigNet< TNodeData, IsDir >::GetNode ( const int &  NId) [inline, protected]
template<class TNodeData, bool IsDir>
int TBigNet< TNodeData, IsDir >::GetNodes ( ) const [inline]
template<class TNodeData , bool IsDir>
void TBigNet< TNodeData, IsDir >::GetOutNIdV ( int  NId,
TIntV OutNIdV 
) const
template<class TNodeData, bool IsDir>
int* TBigNet< TNodeData, IsDir >::GetOutNIdVPt ( const int &  NId) const [inline, protected]
template<class TNodeData, bool IsDir>
TNodeI TBigNet< TNodeData, IsDir >::GetRndNI ( TRnd Rnd = TInt::Rnd) const [inline]
template<class TNodeData, bool IsDir>
int TBigNet< TNodeData, IsDir >::GetRndNId ( TRnd Rnd = TInt::Rnd) const [inline]
template<class TNodeData , bool IsDir>
TPt< TBigNet< TNodeData, IsDir > > TBigNet< TNodeData, IsDir >::GetSubGraph ( const TIntV NIdV,
const bool &  RenumberNodes = false 
) const
template<class TNodeData , bool IsDir>
void TBigNet< TNodeData, IsDir >::GetSubGraph ( const TIntV NIdV,
TBigNet< TNodeData, IsDir > *  NewNet,
const bool &  RenumberNodes = false 
) const
template<class TNodeData , bool IsDir>
PNGraph TBigNet< TNodeData, IsDir >::GetSubNGraph ( const TIntV NIdV) const
template<class TNodeData, bool IsDir>
bool TBigNet< TNodeData, IsDir >::HasFlag ( const TGraphFlag Flag) const [inline]
template<class TNodeData , bool IsDir>
void TBigNet< TNodeData, IsDir >::InvertFromSources ( uint  ExpectNodes = 0)
template<class TNodeData , bool IsDir>
bool TBigNet< TNodeData, IsDir >::IsEdge ( const int &  SrcNId,
const int &  DstNId,
const bool &  Dir = true 
) const
template<class TNodeData , bool IsDir>
bool TBigNet< TNodeData, IsDir >::IsIsoNode ( const int &  NId) const
template<class TNodeData, bool IsDir>
bool TBigNet< TNodeData, IsDir >::IsNode ( const int &  NId,
TNode Node 
) const [inline, protected]
template<class TNodeData, bool IsDir>
bool TBigNet< TNodeData, IsDir >::IsNode ( const int &  NId) const [inline]
template<class TNodeData , bool IsDir>
bool TBigNet< TNodeData, IsDir >::IsOk ( ) const
template<class TNodeData , bool IsDir>
int TBigNet< TNodeData, IsDir >::IsolateNode ( int  NId)
template<class TNodeData, bool IsDir>
static PBigNet TBigNet< TNodeData, IsDir >::Load ( TSIn SIn) [inline, static]
template<class TNodeData , bool IsDir>
void TBigNet< TNodeData, IsDir >::LoadNodeDatH ( const TStr InFNm,
TNodeH NodeH 
) [static]
template<class TNodeData, bool IsDir>
static PBigNet TBigNet< TNodeData, IsDir >::New ( const int &  Nodes,
const TSize Edges,
const bool &  Sources = false 
) [inline, static]
template<class TNodeData, bool IsDir>
bool TBigNet< TNodeData, IsDir >::OnlySources ( ) const [inline]
template<class TNodeData, bool IsDir>
TBigNet& TBigNet< TNodeData, IsDir >::operator= ( const TBigNet< TNodeData, IsDir > &  Net) [inline]
template<class TNodeData , bool IsDir>
void TBigNet< TNodeData, IsDir >::Reserve ( const int &  Nodes,
const TSize Edges 
)
template<class TNodeData , bool IsDir>
void TBigNet< TNodeData, IsDir >::Rewire ( TRnd Rnd = TInt::Rnd)
template<class TNodeData , bool IsDir>
void TBigNet< TNodeData, IsDir >::Save ( TSOut SOut) const [virtual]
template<class TNodeData , bool IsDir>
void TBigNet< TNodeData, IsDir >::SaveForDisk ( const TStr OutFNm) const
template<class TNodeData , bool IsDir>
void TBigNet< TNodeData, IsDir >::SaveToDisk ( const TStr InFNm,
const TStr OutFNm,
const bool &  SaveSparseHash 
) [static]
template<class TNodeData , bool IsDir>
void TBigNet< TNodeData, IsDir >::SetInNIdV ( int  NId,
const TIntV InNIdV 
)
template<class TNodeData , bool IsDir>
void TBigNet< TNodeData, IsDir >::SetOutNIdV ( int  NId,
const TIntV OutNIdV 
)
template<class TNodeData , bool IsDir>
void TBigNet< TNodeData, IsDir >::SortEdgeV ( )

Friends And Related Function Documentation

template<class TNodeData, bool IsDir>
friend class TPt< TBigNet > [friend]

Member Data Documentation

template<class TNodeData, bool IsDir>
TCRef TBigNet< TNodeData, IsDir >::CRef [protected]
template<class TNodeData, bool IsDir>
TB32Set TBigNet< TNodeData, IsDir >::Flags [protected]
template<class TNodeData, bool IsDir>
TInt TBigNet< TNodeData, IsDir >::MxNId [protected]
template<class TNodeData, bool IsDir>
TNodeH TBigNet< TNodeData, IsDir >::NodeH [protected]
template<class TNodeData, bool IsDir>
TPool TBigNet< TNodeData, IsDir >::Pool [protected]

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