SNAP Library 4.0, Developer Reference  2017-07-27 13:18:06
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
TDirNet::TNodeI Class Reference

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

#include <network.h>

Collaboration diagram for TDirNet::TNodeI:

Public Member Functions

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

Private Types

typedef THash< TInt, TNode >::TIter THashIter
 

Private Attributes

THashIter NodeHI
 

Friends

class TDirNet
 

Detailed Description

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

Definition at line 3751 of file network.h.

Member Typedef Documentation

typedef THash<TInt, TNode>::TIter TDirNet::TNodeI::THashIter
private

Definition at line 3753 of file network.h.

Constructor & Destructor Documentation

TDirNet::TNodeI::TNodeI ( )
inline

Definition at line 3756 of file network.h.

3756 : NodeHI() { }
THashIter NodeHI
Definition: network.h:3754
TDirNet::TNodeI::TNodeI ( const THashIter NodeHIter)
inline

Definition at line 3757 of file network.h.

3757 : NodeHI(NodeHIter) { }
THashIter NodeHI
Definition: network.h:3754
TDirNet::TNodeI::TNodeI ( const TNodeI NodeI)
inline

Definition at line 3758 of file network.h.

3758 : NodeHI(NodeI.NodeHI) { }
THashIter NodeHI
Definition: network.h:3754

Member Function Documentation

int TDirNet::TNodeI::GetDeg ( ) const
inline

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

Definition at line 3770 of file network.h.

3770 { return NodeHI.GetDat().GetDeg(); }
THashIter NodeHI
Definition: network.h:3754
int TDirNet::TNodeI::GetId ( ) const
inline

Returns ID of the current node.

Definition at line 3768 of file network.h.

Referenced by TDirNet::AddNode(), TDirNet::AddSAttrDatN(), TDirNet::DelSAttrDatN(), TDirNet::GetSAttrDatN(), and TDirNet::GetSAttrVN().

3768 { return NodeHI.GetDat().GetId(); }
THashIter NodeHI
Definition: network.h:3754

Here is the caller graph for this function:

int TDirNet::TNodeI::GetInDeg ( ) const
inline

Returns in-degree of the current node.

Definition at line 3772 of file network.h.

3772 { return NodeHI.GetDat().GetInDeg(); }
THashIter NodeHI
Definition: network.h:3754
int TDirNet::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().

Definition at line 3780 of file network.h.

3780 { return NodeHI.GetDat().GetInNId(NodeN); }
THashIter NodeHI
Definition: network.h:3754
int TDirNet::TNodeI::GetNbrNId ( const int &  NodeN) const
inline

Returns ID of NodeN-th neighboring node.

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

Definition at line 3788 of file network.h.

3788 { return NodeHI.GetDat().GetNbrNId(NodeN); }
THashIter NodeHI
Definition: network.h:3754
int TDirNet::TNodeI::GetOutDeg ( ) const
inline

Returns out-degree of the current node.

Definition at line 3774 of file network.h.

Referenced by TDirNet::BegEI().

3774 { return NodeHI.GetDat().GetOutDeg(); }
THashIter NodeHI
Definition: network.h:3754

Here is the caller graph for this function:

int TDirNet::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().

Definition at line 3784 of file network.h.

3784 { return NodeHI.GetDat().GetOutNId(NodeN); }
THashIter NodeHI
Definition: network.h:3754
bool TDirNet::TNodeI::IsInNId ( const int &  NId) const
inline

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

Definition at line 3790 of file network.h.

3790 { return NodeHI.GetDat().IsInNId(NId); }
THashIter NodeHI
Definition: network.h:3754
bool TDirNet::TNodeI::IsNbrNId ( const int &  NId) const
inline

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

Definition at line 3794 of file network.h.

3794 { return IsOutNId(NId) || IsInNId(NId); }
bool IsOutNId(const int &NId) const
Tests whether the current node points to node with ID NId.
Definition: network.h:3792
bool IsInNId(const int &NId) const
Tests whether node with ID NId points to the current node.
Definition: network.h:3790
bool TDirNet::TNodeI::IsOutNId ( const int &  NId) const
inline

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

Definition at line 3792 of file network.h.

3792 { return NodeHI.GetDat().IsOutNId(NId); }
THashIter NodeHI
Definition: network.h:3754
TNodeI& TDirNet::TNodeI::operator++ ( int  )
inline

Increment iterator.

Definition at line 3761 of file network.h.

3761 { NodeHI++; return *this; }
THashIter NodeHI
Definition: network.h:3754
TNodeI& TDirNet::TNodeI::operator-- ( int  )
inline

Decrement iterator.

Definition at line 3763 of file network.h.

3763 { NodeHI--; return *this; }
THashIter NodeHI
Definition: network.h:3754
bool TDirNet::TNodeI::operator< ( const TNodeI NodeI) const
inline

Definition at line 3765 of file network.h.

References NodeHI.

3765 { return NodeHI < NodeI.NodeHI; }
THashIter NodeHI
Definition: network.h:3754
TNodeI& TDirNet::TNodeI::operator= ( const TNodeI NodeI)
inline

Definition at line 3759 of file network.h.

References NodeHI.

3759 { NodeHI = NodeI.NodeHI; return *this; }
THashIter NodeHI
Definition: network.h:3754
bool TDirNet::TNodeI::operator== ( const TNodeI NodeI) const
inline

Definition at line 3766 of file network.h.

References NodeHI.

3766 { return NodeHI == NodeI.NodeHI; }
THashIter NodeHI
Definition: network.h:3754
void TDirNet::TNodeI::SortNIdV ( )
inline

Sorts the adjacency lists of the current node.

Definition at line 3776 of file network.h.

3776 { NodeHI.GetDat().SortNIdV(); }
THashIter NodeHI
Definition: network.h:3754

Friends And Related Function Documentation

friend class TDirNet
friend

Definition at line 3795 of file network.h.

Member Data Documentation

THashIter TDirNet::TNodeI::NodeHI
private

Definition at line 3754 of file network.h.

Referenced by TDirNet::GetEI(), operator<(), operator=(), and operator==().


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