SNAP Library 2.4, User 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
TBPGraph::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 ()
 

Private Attributes

TInt Id
 
TIntV NIdV
 
TNodeTy NodeTy
 

Friends

class TBPGraph
 

Detailed Description

Definition at line 840 of file graph.h.

Constructor & Destructor Documentation

TBPGraph::TNode::TNode ( )
inline

Definition at line 846 of file graph.h.

846 : Id(-1), NIdV(), NodeTy(bgsUndef) { }
TNodeTy NodeTy
Definition: graph.h:844
TIntV NIdV
Definition: graph.h:843
TBPGraph::TNode::TNode ( const int &  NId)
inline

Definition at line 847 of file graph.h.

847 : Id(NId), NIdV(), NodeTy(true?bgsLeft:bgsRight) { }
TNodeTy NodeTy
Definition: graph.h:844
TIntV NIdV
Definition: graph.h:843
TBPGraph::TNode::TNode ( const TNode Node)
inline

Definition at line 848 of file graph.h.

848 : Id(Node.Id), NIdV(Node.NIdV), NodeTy(Node.NodeTy) { }
TNodeTy NodeTy
Definition: graph.h:844
TIntV NIdV
Definition: graph.h:843
TBPGraph::TNode::TNode ( TSIn SIn)
inline

Definition at line 849 of file graph.h.

849 : Id(SIn), NIdV(SIn), NodeTy(bgsUndef) { TInt Ty(SIn); NodeTy=(TNodeTy)Ty.Val; }
TNodeTy NodeTy
Definition: graph.h:844
TNodeTy
Definition: graph.h:838
TIntV NIdV
Definition: graph.h:843
Definition: dt.h:1042

Member Function Documentation

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

Definition at line 852 of file graph.h.

852 { return NIdV.Len(); }
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:535
TIntV NIdV
Definition: graph.h:843
int TBPGraph::TNode::GetId ( ) const
inline

Definition at line 851 of file graph.h.

851 { return Id; }
int TBPGraph::TNode::GetInDeg ( ) const
inline

Definition at line 853 of file graph.h.

853 { return GetDeg(); }
int GetDeg() const
Definition: graph.h:852
int TBPGraph::TNode::GetInNId ( const int &  NodeN) const
inline

Definition at line 855 of file graph.h.

855 { return GetNbrNId(NodeN); }
int GetNbrNId(const int &NodeN) const
Definition: graph.h:857
int TBPGraph::TNode::GetNbrNId ( const int &  NodeN) const
inline

Definition at line 857 of file graph.h.

857 { return NIdV[NodeN]; }
TIntV NIdV
Definition: graph.h:843
int TBPGraph::TNode::GetOutDeg ( ) const
inline

Definition at line 854 of file graph.h.

854 { return GetDeg(); }
int GetDeg() const
Definition: graph.h:852
int TBPGraph::TNode::GetOutNId ( const int &  NodeN) const
inline

Definition at line 856 of file graph.h.

856 { return GetNbrNId(NodeN); }
int GetNbrNId(const int &NodeN) const
Definition: graph.h:857
bool TBPGraph::TNode::IsInNId ( const int &  NId) const
inline

Definition at line 859 of file graph.h.

859 { return IsNbrNId(NId); }
bool IsNbrNId(const int &NId) const
Definition: graph.h:858
bool TBPGraph::TNode::IsNbrNId ( const int &  NId) const
inline

Definition at line 858 of file graph.h.

858 { return NIdV.SearchBin(NId)!=-1; }
TIntV NIdV
Definition: graph.h:843
TSizeTy SearchBin(const TVal &Val) const
Returns the position of an element with value Val.
Definition: ds.h:1418
bool TBPGraph::TNode::IsOutNId ( const int &  NId) const
inline

Definition at line 860 of file graph.h.

860 { return IsNbrNId(NId); }
bool IsNbrNId(const int &NId) const
Definition: graph.h:858
void TBPGraph::TNode::PackNIdV ( )
inline

Definition at line 862 of file graph.h.

862 { NIdV.Pack(); }
TIntV NIdV
Definition: graph.h:843
void Pack()
The vector reduces its capacity (frees memory) to match its size.
Definition: ds.h:987
void TBPGraph::TNode::PackOutNIdV ( )
inline

Definition at line 861 of file graph.h.

861 { NIdV.Pack(); }
TIntV NIdV
Definition: graph.h:843
void Pack()
The vector reduces its capacity (frees memory) to match its size.
Definition: ds.h:987
void TBPGraph::TNode::Save ( TSOut SOut) const
inline

Definition at line 850 of file graph.h.

850 { Id.Save(SOut); NIdV.Save(SOut); TInt(NodeTy).Save(SOut); }
TNodeTy NodeTy
Definition: graph.h:844
void Save(TSOut &SOut) const
Definition: dt.h:1058
void Save(TSOut &SOut) const
Definition: ds.h:885
TIntV NIdV
Definition: graph.h:843
Definition: dt.h:1042

Friends And Related Function Documentation

friend class TBPGraph
friend

Definition at line 863 of file graph.h.

Member Data Documentation

TInt TBPGraph::TNode::Id
private

Definition at line 842 of file graph.h.

TIntV TBPGraph::TNode::NIdV
private

Definition at line 843 of file graph.h.

TNodeTy TBPGraph::TNode::NodeTy
private

Definition at line 844 of file graph.h.


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