SNAP Library 4.0, Developer Reference  2017-07-27 13:18:06
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 LoadShM (TShMIn &ShMIn)
 
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 ()
 
void SortNIdV ()
 

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 52 of file graph.h.

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

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

52 { return NIdV.Len(); }
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:575
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 51 of file graph.h.

References Id.

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

51 { return Id; }

Here is the caller graph for this function:

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

Definition at line 53 of file graph.h.

References GetDeg().

53 { return GetDeg(); }
int GetDeg() const
Definition: graph.h:52

Here is the call graph for this function:

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

Definition at line 55 of file graph.h.

References GetNbrNId().

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

Here is the call graph for this function:

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

Definition at line 57 of file graph.h.

References NIdV.

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

57 { 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 54 of file graph.h.

References GetDeg().

54 { return GetDeg(); }
int GetDeg() const
Definition: graph.h:52

Here is the call graph for this function:

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

Definition at line 56 of file graph.h.

References GetNbrNId().

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

Here is the call graph for this function:

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

Definition at line 59 of file graph.h.

References IsNbrNId().

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

Here is the call graph for this function:

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

Definition at line 58 of file graph.h.

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

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

58 { 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:1519

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 60 of file graph.h.

References IsNbrNId().

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

Here is the call graph for this function:

void TUNGraph::TNode::LoadShM ( TShMIn ShMIn)
inline

Definition at line 46 of file graph.h.

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

Referenced by TUNGraph::TLoadTNodeInitializer::operator()().

46  {
47  Id = TInt(ShMIn);
48  NIdV.LoadShM(ShMIn);
49  }
TIntV NIdV
Definition: graph.h:40
Definition: dt.h:1134
void LoadShM(TShMIn &ShMIn)
Constructs the vector from a shared memory input.
Definition: ds.h:932

Here is the call graph for this function:

Here is the caller graph for this function:

void TUNGraph::TNode::PackNIdV ( )
inline

Definition at line 62 of file graph.h.

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

62 { NIdV.Pack(); }
TIntV NIdV
Definition: graph.h:40
void Pack()
Reduces vector capacity (frees memory) to match its size.
Definition: ds.h:1057

Here is the call graph for this function:

void TUNGraph::TNode::PackOutNIdV ( )
inline

Definition at line 61 of file graph.h.

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

61 { NIdV.Pack(); }
TIntV NIdV
Definition: graph.h:40
void Pack()
Reduces vector capacity (frees memory) to match its size.
Definition: ds.h:1057

Here is the call graph for this function:

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

Definition at line 50 of file graph.h.

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

50 { Id.Save(SOut); NIdV.Save(SOut); }
void Save(TSOut &SOut) const
Definition: dt.h:1150
void Save(TSOut &SOut) const
Definition: ds.h:954
TIntV NIdV
Definition: graph.h:40

Here is the call graph for this function:

void TUNGraph::TNode::SortNIdV ( )
inline

Definition at line 63 of file graph.h.

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

63 { NIdV.Sort();}
void Sort(const bool &Asc=true)
Sorts the elements of the vector.
Definition: ds.h:1318
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 64 of file graph.h.

friend class TUNGraphMtx
friend

Definition at line 65 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(), LoadShM(), and Save().


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