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
TNEGraph::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 GetInEId (const int &EdgeN) const
 
int GetOutEId (const int &EdgeN) const
 
int GetNbrEId (const int &EdgeN) const
 
bool IsInEId (const int &EId) const
 
bool IsOutEId (const int &EId) const
 

Private Attributes

TInt Id
 
TIntV InEIdV
 
TIntV OutEIdV
 

Friends

class TNEGraph
 

Detailed Description

Definition at line 590 of file graph.h.

Constructor & Destructor Documentation

TNEGraph::TNode::TNode ( )
inline

Definition at line 595 of file graph.h.

595 : Id(-1), InEIdV(), OutEIdV() { }
TIntV OutEIdV
Definition: graph.h:593
TIntV InEIdV
Definition: graph.h:593
TNEGraph::TNode::TNode ( const int &  NId)
inline

Definition at line 596 of file graph.h.

596 : Id(NId), InEIdV(), OutEIdV() { }
TIntV OutEIdV
Definition: graph.h:593
TIntV InEIdV
Definition: graph.h:593
TNEGraph::TNode::TNode ( const TNode Node)
inline

Definition at line 597 of file graph.h.

597 : Id(Node.Id), InEIdV(Node.InEIdV), OutEIdV(Node.OutEIdV) { }
TIntV OutEIdV
Definition: graph.h:593
TIntV InEIdV
Definition: graph.h:593
TNEGraph::TNode::TNode ( TSIn SIn)
inline

Definition at line 598 of file graph.h.

598 : Id(SIn), InEIdV(SIn), OutEIdV(SIn) { }
TIntV OutEIdV
Definition: graph.h:593
TIntV InEIdV
Definition: graph.h:593

Member Function Documentation

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

Definition at line 601 of file graph.h.

601 { return GetInDeg() + GetOutDeg(); }
int GetInDeg() const
Definition: graph.h:602
int GetOutDeg() const
Definition: graph.h:603
int TNEGraph::TNode::GetId ( ) const
inline

Definition at line 600 of file graph.h.

600 { return Id; }
int TNEGraph::TNode::GetInDeg ( ) const
inline

Definition at line 602 of file graph.h.

602 { return InEIdV.Len(); }
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:547
TIntV InEIdV
Definition: graph.h:593
int TNEGraph::TNode::GetInEId ( const int &  EdgeN) const
inline

Definition at line 604 of file graph.h.

604 { return InEIdV[EdgeN]; }
TIntV InEIdV
Definition: graph.h:593
int TNEGraph::TNode::GetNbrEId ( const int &  EdgeN) const
inline

Definition at line 606 of file graph.h.

606 { return EdgeN<GetOutDeg()?GetOutEId(EdgeN):GetInEId(EdgeN-GetOutDeg()); }
int GetOutEId(const int &EdgeN) const
Definition: graph.h:605
int GetOutDeg() const
Definition: graph.h:603
int GetInEId(const int &EdgeN) const
Definition: graph.h:604
int TNEGraph::TNode::GetOutDeg ( ) const
inline

Definition at line 603 of file graph.h.

603 { return OutEIdV.Len(); }
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:547
TIntV OutEIdV
Definition: graph.h:593
int TNEGraph::TNode::GetOutEId ( const int &  EdgeN) const
inline

Definition at line 605 of file graph.h.

605 { return OutEIdV[EdgeN]; }
TIntV OutEIdV
Definition: graph.h:593
bool TNEGraph::TNode::IsInEId ( const int &  EId) const
inline

Definition at line 607 of file graph.h.

607 { return InEIdV.SearchBin(EId) != -1; }
TSizeTy SearchBin(const TVal &Val) const
Returns the position of an element with value Val.
Definition: ds.h:1454
TIntV InEIdV
Definition: graph.h:593
bool TNEGraph::TNode::IsOutEId ( const int &  EId) const
inline

Definition at line 608 of file graph.h.

608 { return OutEIdV.SearchBin(EId) != -1; }
TIntV OutEIdV
Definition: graph.h:593
TSizeTy SearchBin(const TVal &Val) const
Returns the position of an element with value Val.
Definition: ds.h:1454
void TNEGraph::TNode::Save ( TSOut SOut) const
inline

Definition at line 599 of file graph.h.

599 { Id.Save(SOut); InEIdV.Save(SOut); OutEIdV.Save(SOut); }
void Save(TSOut &SOut) const
Definition: dt.h:1060
void Save(TSOut &SOut) const
Definition: ds.h:903
TIntV OutEIdV
Definition: graph.h:593
TIntV InEIdV
Definition: graph.h:593

Friends And Related Function Documentation

friend class TNEGraph
friend

Definition at line 609 of file graph.h.

Member Data Documentation

TInt TNEGraph::TNode::Id
private

Definition at line 592 of file graph.h.

TIntV TNEGraph::TNode::InEIdV
private

Definition at line 593 of file graph.h.

TIntV TNEGraph::TNode::OutEIdV
private

Definition at line 593 of file graph.h.


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