SNAP Library, User Reference  2012-10-02 12:56:23
SNAP, a general purpose network analysis and graph mining library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TNGraph::TNodeI Class Reference

Node iterator. Only forward iteration (operator++) is supported. More...

List of all members.

Public Member Functions

 TNodeI ()
 TNodeI (const THashIter &NodeHIter)
 TNodeI (const TNodeI &NodeI)
TNodeIoperator= (const TNodeI &NodeI)
TNodeIoperator++ (int)
 Increment iterator.
bool operator< (const TNodeI &NodeI) const
bool operator== (const TNodeI &NodeI) const
int GetId () const
 Returns ID of the current node.
int GetDeg () const
 Returns degree of the current node, the sum of in-degree and out-degree.
int GetInDeg () const
 Returns in-degree of the current node.
int GetOutDeg () const
 Returns out-degree of the current node.
int GetInNId (const int &NodeN) const
 Returns ID of NodeN-th in-node (the node pointing to the current node).
int GetOutNId (const int &NodeN) const
 Returns ID of NodeN-th out-node (the node the current node points to).
int GetNbrNId (const int &NodeN) const
 Returns ID of NodeN-th neighboring node.
bool IsInNId (const int &NId) const
 Tests whether node with ID NId points to the current node.
bool IsOutNId (const int &NId) const
 Tests whether the current node points to node with ID NId.
bool IsNbrNId (const int &NId) const
 Tests whether node with ID NId is a neighbor of the current node.

Friends

class TNGraph

Detailed Description

Node iterator. Only forward iteration (operator++) is supported.


Constructor & Destructor Documentation

TNGraph::TNodeI::TNodeI ( const THashIter &  NodeHIter) [inline]
TNGraph::TNodeI::TNodeI ( const TNodeI NodeI) [inline]

Member Function Documentation

int TNGraph::TNodeI::GetDeg ( ) const [inline]

Returns degree of the current node, the sum of in-degree and out-degree.

int TNGraph::TNodeI::GetId ( ) const [inline]

Returns ID of the current node.

int TNGraph::TNodeI::GetInDeg ( ) const [inline]

Returns in-degree of the current node.

int TNGraph::TNodeI::GetInNId ( const int &  NodeN) const [inline]

Returns ID of NodeN-th in-node (the node pointing to the current node).

Range of NodeN: 0 <= NodeN < GetInDeg().

int TNGraph::TNodeI::GetNbrNId ( const int &  NodeN) const [inline]

Returns ID of NodeN-th neighboring node.

Range of NodeN: 0 <= NodeN < GetNbrDeg().

int TNGraph::TNodeI::GetOutDeg ( ) const [inline]

Returns out-degree of the current node.

int TNGraph::TNodeI::GetOutNId ( const int &  NodeN) const [inline]

Returns ID of NodeN-th out-node (the node the current node points to).

Range of NodeN: 0 <= NodeN < GetOutDeg().

bool TNGraph::TNodeI::IsInNId ( const int &  NId) const [inline]

Tests whether node with ID NId points to the current node.

bool TNGraph::TNodeI::IsNbrNId ( const int &  NId) const [inline]

Tests whether node with ID NId is a neighbor of the current node.

bool TNGraph::TNodeI::IsOutNId ( const int &  NId) const [inline]

Tests whether the current node points to node with ID NId.

TNodeI& TNGraph::TNodeI::operator++ ( int  ) [inline]

Increment iterator.

bool TNGraph::TNodeI::operator< ( const TNodeI NodeI) const [inline]
TNodeI& TNGraph::TNodeI::operator= ( const TNodeI NodeI) [inline]
bool TNGraph::TNodeI::operator== ( const TNodeI NodeI) const [inline]

Friends And Related Function Documentation

friend class TNGraph [friend]

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