SNAP Library 3.0, User Reference  2016-07-20 17:56:49
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>

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 ()
 
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 48 of file graph.h.

48 { return NIdV.Len(); }
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:547
TIntV NIdV
Definition: graph.h:40
int TUNGraph::TNode::GetId ( ) const
inline

Definition at line 47 of file graph.h.

47 { return Id; }
int TUNGraph::TNode::GetInDeg ( ) const
inline

Definition at line 49 of file graph.h.

49 { return GetDeg(); }
int GetDeg() const
Definition: graph.h:48
int TUNGraph::TNode::GetInNId ( const int &  NodeN) const
inline

Definition at line 51 of file graph.h.

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

Definition at line 53 of file graph.h.

53 { return NIdV[NodeN]; }
TIntV NIdV
Definition: graph.h:40
int TUNGraph::TNode::GetOutDeg ( ) const
inline

Definition at line 50 of file graph.h.

50 { return GetDeg(); }
int GetDeg() const
Definition: graph.h:48
int TUNGraph::TNode::GetOutNId ( const int &  NodeN) const
inline

Definition at line 52 of file graph.h.

52 { return GetNbrNId(NodeN); }
int GetNbrNId(const int &NodeN) const
Definition: graph.h:53
bool TUNGraph::TNode::IsInNId ( const int &  NId) const
inline

Definition at line 55 of file graph.h.

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

Definition at line 54 of file graph.h.

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:1454
bool TUNGraph::TNode::IsOutNId ( const int &  NId) const
inline

Definition at line 56 of file graph.h.

56 { return IsNbrNId(NId); }
bool IsNbrNId(const int &NId) const
Definition: graph.h:54
void TUNGraph::TNode::PackNIdV ( )
inline

Definition at line 58 of file graph.h.

58 { NIdV.Pack(); }
TIntV NIdV
Definition: graph.h:40
void Pack()
Reduces vector capacity (frees memory) to match its size.
Definition: ds.h:1005
void TUNGraph::TNode::PackOutNIdV ( )
inline

Definition at line 57 of file graph.h.

57 { NIdV.Pack(); }
TIntV NIdV
Definition: graph.h:40
void Pack()
Reduces vector capacity (frees memory) to match its size.
Definition: ds.h:1005
void TUNGraph::TNode::Save ( TSOut SOut) const
inline

Definition at line 46 of file graph.h.

46 { Id.Save(SOut); NIdV.Save(SOut); }
void Save(TSOut &SOut) const
Definition: dt.h:1060
void Save(TSOut &SOut) const
Definition: ds.h:903
TIntV NIdV
Definition: graph.h:40
void TUNGraph::TNode::SortNIdV ( )
inline

Definition at line 59 of file graph.h.

59 { NIdV.Sort();}
void Sort(const bool &Asc=true)
Sorts the elements of the vector.
Definition: ds.h:1254
TIntV NIdV
Definition: graph.h:40

Friends And Related Function Documentation

friend class TUNGraph
friend

Definition at line 60 of file graph.h.

friend class TUNGraphMtx
friend

Definition at line 61 of file graph.h.

Member Data Documentation

TInt TUNGraph::TNode::Id
private

Definition at line 39 of file graph.h.

TIntV TUNGraph::TNode::NIdV
private

Definition at line 40 of file graph.h.


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