SNAP Library 4.1, User Reference  2018-07-26 16:30:42
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 934 of file graph.h.

Constructor & Destructor Documentation

TBPGraph::TNode::TNode ( )
inline

Definition at line 940 of file graph.h.

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

Definition at line 941 of file graph.h.

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

Definition at line 942 of file graph.h.

942 : Id(Node.Id), NIdV(Node.NIdV), NodeTy(Node.NodeTy) { }
TNodeTy NodeTy
Definition: graph.h:938
TIntV NIdV
Definition: graph.h:937
TBPGraph::TNode::TNode ( TSIn SIn)
inline

Definition at line 943 of file graph.h.

943 : Id(SIn), NIdV(SIn), NodeTy(bgsUndef) { TInt Ty(SIn); NodeTy=(TNodeTy)Ty.Val; }
TNodeTy NodeTy
Definition: graph.h:938
TNodeTy
Definition: graph.h:932
TIntV NIdV
Definition: graph.h:937
Definition: dt.h:1134

Member Function Documentation

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

Definition at line 946 of file graph.h.

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

Definition at line 945 of file graph.h.

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

Definition at line 947 of file graph.h.

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

Definition at line 949 of file graph.h.

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

Definition at line 951 of file graph.h.

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

Definition at line 948 of file graph.h.

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

Definition at line 950 of file graph.h.

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

Definition at line 953 of file graph.h.

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

Definition at line 952 of file graph.h.

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

Definition at line 954 of file graph.h.

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

Definition at line 956 of file graph.h.

956 { NIdV.Pack(); }
TIntV NIdV
Definition: graph.h:937
void Pack()
Reduces vector capacity (frees memory) to match its size.
Definition: ds.h:1057
void TBPGraph::TNode::PackOutNIdV ( )
inline

Definition at line 955 of file graph.h.

955 { NIdV.Pack(); }
TIntV NIdV
Definition: graph.h:937
void Pack()
Reduces vector capacity (frees memory) to match its size.
Definition: ds.h:1057
void TBPGraph::TNode::Save ( TSOut SOut) const
inline

Definition at line 944 of file graph.h.

944 { Id.Save(SOut); NIdV.Save(SOut); TInt(NodeTy).Save(SOut); }
TNodeTy NodeTy
Definition: graph.h:938
void Save(TSOut &SOut) const
Definition: dt.h:1150
void Save(TSOut &SOut) const
Definition: ds.h:954
TIntV NIdV
Definition: graph.h:937
Definition: dt.h:1134

Friends And Related Function Documentation

friend class TBPGraph
friend

Definition at line 957 of file graph.h.

Member Data Documentation

TInt TBPGraph::TNode::Id
private

Definition at line 936 of file graph.h.

TIntV TBPGraph::TNode::NIdV
private

Definition at line 937 of file graph.h.

TNodeTy TBPGraph::TNode::NodeTy
private

Definition at line 938 of file graph.h.


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