SNAP Library 2.4, Developer Reference  2015-05-11 19:40:56
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
TUNGraph::TNode Class Reference

#include <graph.h>

Collaboration diagram for TUNGraph::TNode:

Public Member Functions

 TNode ()
 
 TNode (const int &NId)
 
 TNode (const TNode &Node)
 
 TNode (TSIn &SIn)
 
void Save (TSOut &SOut) const
 
int GetId () const
 
int GetDeg () const
 
int GetInDeg () const
 
int GetOutDeg () const
 
int GetInNId (const int &NodeN) const
 
int GetOutNId (const int &NodeN) const
 
int GetNbrNId (const int &NodeN) const
 
bool IsNbrNId (const int &NId) const
 
bool IsInNId (const int &NId) const
 
bool IsOutNId (const int &NId) const
 
void PackOutNIdV ()
 
void PackNIdV ()
 

Private Attributes

TInt Id
 
TIntV NIdV
 

Friends

class TUNGraph
 
class TUNGraphMtx
 

Detailed Description

Definition at line 37 of file graph.h.

Constructor & Destructor Documentation

TUNGraph::TNode::TNode ( )
inline

Definition at line 42 of file graph.h.

42 : Id(-1), NIdV() { }
TIntV NIdV
Definition: graph.h:40
TUNGraph::TNode::TNode ( const int &  NId)
inline

Definition at line 43 of file graph.h.

43 : Id(NId), NIdV() { }
TIntV NIdV
Definition: graph.h:40
TUNGraph::TNode::TNode ( const TNode Node)
inline

Definition at line 44 of file graph.h.

44 : Id(Node.Id), NIdV(Node.NIdV) { }
TIntV NIdV
Definition: graph.h:40
TUNGraph::TNode::TNode ( TSIn SIn)
inline

Definition at line 45 of file graph.h.

45 : Id(SIn), NIdV(SIn) { }
TIntV NIdV
Definition: graph.h:40

Member Function Documentation

int TUNGraph::TNode::GetDeg ( ) const
inline

Definition at line 48 of file graph.h.

References TVec< TVal, TSizeTy >::Len(), and NIdV.

Referenced by TUNGraph::AddNode(), TUNGraph::DelNode(), TUNGraph::Dump(), GetInDeg(), GetOutDeg(), and TUNGraph::IsOk().

48 { return NIdV.Len(); }
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:535
TIntV NIdV
Definition: graph.h:40

Here is the call graph for this function:

Here is the caller graph for this function:

int TUNGraph::TNode::GetId ( ) const
inline

Definition at line 47 of file graph.h.

References Id.

Referenced by TUNGraph::DelNode(), TUNGraph::Dump(), and TUNGraph::IsOk().

47 { return Id; }

Here is the caller graph for this function:

int TUNGraph::TNode::GetInDeg ( ) const
inline

Definition at line 49 of file graph.h.

References GetDeg().

49 { return GetDeg(); }
int GetDeg() const
Definition: graph.h:48

Here is the call graph for this function:

int TUNGraph::TNode::GetInNId ( const int &  NodeN) const
inline

Definition at line 51 of file graph.h.

References GetNbrNId().

51 { return GetNbrNId(NodeN); }
int GetNbrNId(const int &NodeN) const
Definition: graph.h:53

Here is the call graph for this function:

int TUNGraph::TNode::GetNbrNId ( const int &  NodeN) const
inline

Definition at line 53 of file graph.h.

References NIdV.

Referenced by TUNGraph::DelNode(), TUNGraph::Dump(), GetInNId(), GetOutNId(), and TUNGraph::IsOk().

53 { return NIdV[NodeN]; }
TIntV NIdV
Definition: graph.h:40

Here is the caller graph for this function:

int TUNGraph::TNode::GetOutDeg ( ) const
inline

Definition at line 50 of file graph.h.

References GetDeg().

50 { return GetDeg(); }
int GetDeg() const
Definition: graph.h:48

Here is the call graph for this function:

int TUNGraph::TNode::GetOutNId ( const int &  NodeN) const
inline

Definition at line 52 of file graph.h.

References GetNbrNId().

52 { return GetNbrNId(NodeN); }
int GetNbrNId(const int &NodeN) const
Definition: graph.h:53

Here is the call graph for this function:

bool TUNGraph::TNode::IsInNId ( const int &  NId) const
inline

Definition at line 55 of file graph.h.

References IsNbrNId().

55 { return IsNbrNId(NId); }
bool IsNbrNId(const int &NId) const
Definition: graph.h:54

Here is the call graph for this function:

bool TUNGraph::TNode::IsNbrNId ( const int &  NId) const
inline

Definition at line 54 of file graph.h.

References NIdV, and TVec< TVal, TSizeTy >::SearchBin().

Referenced by TUNGraph::IsEdge(), IsInNId(), and IsOutNId().

54 { return NIdV.SearchBin(NId)!=-1; }
TIntV NIdV
Definition: graph.h:40
TSizeTy SearchBin(const TVal &Val) const
Returns the position of an element with value Val.
Definition: ds.h:1418

Here is the call graph for this function:

Here is the caller graph for this function:

bool TUNGraph::TNode::IsOutNId ( const int &  NId) const
inline

Definition at line 56 of file graph.h.

References IsNbrNId().

56 { return IsNbrNId(NId); }
bool IsNbrNId(const int &NId) const
Definition: graph.h:54

Here is the call graph for this function:

void TUNGraph::TNode::PackNIdV ( )
inline

Definition at line 58 of file graph.h.

References NIdV, and TVec< TVal, TSizeTy >::Pack().

58 { NIdV.Pack(); }
TIntV NIdV
Definition: graph.h:40
void Pack()
The vector reduces its capacity (frees memory) to match its size.
Definition: ds.h:987

Here is the call graph for this function:

void TUNGraph::TNode::PackOutNIdV ( )
inline

Definition at line 57 of file graph.h.

References NIdV, and TVec< TVal, TSizeTy >::Pack().

57 { NIdV.Pack(); }
TIntV NIdV
Definition: graph.h:40
void Pack()
The vector reduces its capacity (frees memory) to match its size.
Definition: ds.h:987

Here is the call graph for this function:

void TUNGraph::TNode::Save ( TSOut SOut) const
inline

Definition at line 46 of file graph.h.

References Id, NIdV, TVec< TVal, TSizeTy >::Save(), and TInt::Save().

46 { Id.Save(SOut); NIdV.Save(SOut); }
void Save(TSOut &SOut) const
Definition: dt.h:1058
void Save(TSOut &SOut) const
Definition: ds.h:885
TIntV NIdV
Definition: graph.h:40

Here is the call graph for this function:

Friends And Related Function Documentation

friend class TUNGraph
friend

Definition at line 59 of file graph.h.

friend class TUNGraphMtx
friend

Definition at line 60 of file graph.h.

Member Data Documentation

TInt TUNGraph::TNode::Id
private

Definition at line 39 of file graph.h.

Referenced by TUNGraph::AddNode(), GetId(), and Save().


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