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

Constructor & Destructor Documentation

TBPGraph::TNode::TNode ( )
inline

Definition at line 868 of file graph.h.

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

Definition at line 869 of file graph.h.

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

Definition at line 870 of file graph.h.

870 : Id(Node.Id), NIdV(Node.NIdV), NodeTy(Node.NodeTy) { }
TNodeTy NodeTy
Definition: graph.h:866
TIntV NIdV
Definition: graph.h:865
TBPGraph::TNode::TNode ( TSIn SIn)
inline

Definition at line 871 of file graph.h.

871 : Id(SIn), NIdV(SIn), NodeTy(bgsUndef) { TInt Ty(SIn); NodeTy=(TNodeTy)Ty.Val; }
TNodeTy NodeTy
Definition: graph.h:866
TNodeTy
Definition: graph.h:860
TIntV NIdV
Definition: graph.h:865
Definition: dt.h:1044

Member Function Documentation

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

Definition at line 874 of file graph.h.

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

Definition at line 873 of file graph.h.

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

Definition at line 875 of file graph.h.

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

Definition at line 877 of file graph.h.

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

Definition at line 879 of file graph.h.

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

Definition at line 876 of file graph.h.

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

Definition at line 878 of file graph.h.

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

Definition at line 881 of file graph.h.

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

Definition at line 880 of file graph.h.

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

Definition at line 882 of file graph.h.

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

Definition at line 884 of file graph.h.

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

Definition at line 883 of file graph.h.

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

Definition at line 872 of file graph.h.

872 { Id.Save(SOut); NIdV.Save(SOut); TInt(NodeTy).Save(SOut); }
TNodeTy NodeTy
Definition: graph.h:866
void Save(TSOut &SOut) const
Definition: dt.h:1060
void Save(TSOut &SOut) const
Definition: ds.h:903
TIntV NIdV
Definition: graph.h:865
Definition: dt.h:1044

Friends And Related Function Documentation

friend class TBPGraph
friend

Definition at line 885 of file graph.h.

Member Data Documentation

TInt TBPGraph::TNode::Id
private

Definition at line 864 of file graph.h.

TIntV TBPGraph::TNode::NIdV
private

Definition at line 865 of file graph.h.

TNodeTy TBPGraph::TNode::NodeTy
private

Definition at line 866 of file graph.h.


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