SNAP Library 2.0, Developer Reference  2013-05-13 16:33:57
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TNodeEDatNet< TNodeData, TEdgeData >::TNodeI Class Reference

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

#include <network.h>

Collaboration diagram for TNodeEDatNet< TNodeData, TEdgeData >::TNodeI:

List of all members.

Public Member Functions

 TNodeI ()
 TNodeI (const THashIter &NodeHIter, const TNodeEDatNet *NetPt)
 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.
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.
const TNodeData & operator() () const
TNodeData & operator() ()
const TNodeData & GetDat () const
TNodeData & GetDat ()
const TNodeData & GetOutNDat (const int &NodeN) const
TNodeData & GetOutNDat (const int &NodeN)
const TNodeData & GetInNDat (const int &NodeN) const
TNodeData & GetInNDat (const int &NodeN)
const TNodeData & GetNbrNDat (const int &NodeN) const
TNodeData & GetNbrNDat (const int &NodeN)
TEdgeData & GetOutEDat (const int &EdgeN)
const TEdgeData & GetOutEDat (const int &EdgeN) const
TEdgeData & GetInEDat (const int &EdgeN)
const TEdgeData & GetInEDat (const int &EdgeN) const
TEdgeData & GetNbrEDat (const int &EdgeN)
const TEdgeData & GetNbrEDat (const int &EdgeN) const

Private Types

typedef THash< TInt, TNode >::TIter THashIter

Private Attributes

THashIter NodeHI
TNodeEDatNetNet

Friends

class TNodeEDatNet< TNodeData, TEdgeData >

Detailed Description

template<class TNodeData, class TEdgeData>
class TNodeEDatNet< TNodeData, TEdgeData >::TNodeI

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

Definition at line 481 of file network.h.


Member Typedef Documentation

template<class TNodeData, class TEdgeData>
typedef THash<TInt, TNode>::TIter TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::THashIter [private]

Definition at line 483 of file network.h.


Constructor & Destructor Documentation

template<class TNodeData, class TEdgeData>
TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::TNodeI ( ) [inline]

Definition at line 487 of file network.h.

: NodeHI(), Net(NULL) { }
template<class TNodeData, class TEdgeData>
TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::TNodeI ( const THashIter NodeHIter,
const TNodeEDatNet NetPt 
) [inline]

Definition at line 488 of file network.h.

: NodeHI(NodeHIter), Net((TNodeEDatNet *) NetPt) { }
template<class TNodeData, class TEdgeData>
TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::TNodeI ( const TNodeI NodeI) [inline]

Definition at line 489 of file network.h.

: NodeHI(NodeI.NodeHI), Net(NodeI.Net) { }

Member Function Documentation

template<class TNodeData, class TEdgeData>
const TNodeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetDat ( ) const [inline]

Definition at line 525 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::NodeHI.

{ return NodeHI.GetDat().GetDat(); }
template<class TNodeData, class TEdgeData>
TNodeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetDat ( ) [inline]

Definition at line 526 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::NodeHI.

{ return NodeHI.GetDat().GetDat(); }
template<class TNodeData, class TEdgeData>
int TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetDeg ( ) const [inline]

Returns degree of the current node.

Definition at line 499 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::NodeHI.

{ return NodeHI.GetDat().GetDeg(); }
template<class TNodeData, class TEdgeData>
int TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetId ( ) const [inline]

Returns ID of the current node.

Definition at line 497 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::NodeHI.

Referenced by TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetInEDat(), and TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::GetSrcNId().

{ return NodeHI.GetDat().GetId(); }

Here is the caller graph for this function:

template<class TNodeData, class TEdgeData>
int TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetInDeg ( ) const [inline]

Returns in-degree of the current node.

Definition at line 501 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::NodeHI.

{ return NodeHI.GetDat().GetInDeg(); }
template<class TNodeData, class TEdgeData>
TEdgeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetInEDat ( const int &  EdgeN) [inline]
template<class TNodeData, class TEdgeData>
const TEdgeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetInEDat ( const int &  EdgeN) const [inline]
template<class TNodeData, class TEdgeData>
const TNodeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetInNDat ( const int &  NodeN) const [inline]
template<class TNodeData, class TEdgeData>
TNodeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetInNDat ( const int &  NodeN) [inline]
template<class TNodeData, class TEdgeData>
int TNodeEDatNet< TNodeData, TEdgeData >::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 507 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::NodeHI.

Referenced by TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetInEDat(), and TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetInNDat().

{ return NodeHI.GetDat().GetInNId(NodeN); }

Here is the caller graph for this function:

template<class TNodeData, class TEdgeData>
TEdgeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetNbrEDat ( const int &  EdgeN) [inline]
template<class TNodeData, class TEdgeData>
const TEdgeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetNbrEDat ( const int &  EdgeN) const [inline]
template<class TNodeData, class TEdgeData>
const TNodeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetNbrNDat ( const int &  NodeN) const [inline]
template<class TNodeData, class TEdgeData>
TNodeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetNbrNDat ( const int &  NodeN) [inline]
template<class TNodeData, class TEdgeData>
int TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetNbrNId ( const int &  NodeN) const [inline]

Returns ID of NodeN-th neighboring node.

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

Definition at line 515 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::NodeHI.

Referenced by TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetNbrNDat().

{ return NodeHI.GetDat().GetNbrNId(NodeN); }

Here is the caller graph for this function:

template<class TNodeData, class TEdgeData>
int TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetOutDeg ( ) const [inline]

Returns out-degree of the current node.

Definition at line 503 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::NodeHI.

Referenced by TNodeEDatNet< TStr, TFltFltH >::BegEI(), TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetNbrEDat(), and TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::operator++().

{ return NodeHI.GetDat().GetOutDeg(); }

Here is the caller graph for this function:

template<class TNodeData, class TEdgeData>
TEdgeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetOutEDat ( const int &  EdgeN) [inline]
template<class TNodeData, class TEdgeData>
const TEdgeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetOutEDat ( const int &  EdgeN) const [inline]

Definition at line 535 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::NodeHI.

{ return NodeHI.GetDat().GetOutEDat(EdgeN); }
template<class TNodeData, class TEdgeData>
const TNodeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetOutNDat ( const int &  NodeN) const [inline]

Definition at line 527 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::GetNDat(), TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetOutNId(), and TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::Net.

Referenced by TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::GetDstNDat().

{ return Net->GetNDat(GetOutNId(NodeN)); }

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TNodeData, class TEdgeData>
TNodeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetOutNDat ( const int &  NodeN) [inline]
template<class TNodeData, class TEdgeData>
int TNodeEDatNet< TNodeData, TEdgeData >::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 511 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::NodeHI.

Referenced by TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::GetDstNId(), and TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetOutNDat().

{ return NodeHI.GetDat().GetOutNId(NodeN); }

Here is the caller graph for this function:

template<class TNodeData, class TEdgeData>
bool TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::IsInNId ( const int &  NId) const [inline]

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

Definition at line 517 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::NodeHI.

Referenced by TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::IsNbrNId().

{ return NodeHI.GetDat().IsInNId(NId); }

Here is the caller graph for this function:

template<class TNodeData, class TEdgeData>
bool TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::IsNbrNId ( const int &  NId) const [inline]

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

Definition at line 521 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::IsInNId(), and TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::IsOutNId().

{ return IsOutNId(NId) || IsInNId(NId); }

Here is the call graph for this function:

template<class TNodeData, class TEdgeData>
bool TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::IsOutNId ( const int &  NId) const [inline]

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

Definition at line 519 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::NodeHI.

Referenced by TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::IsNbrNId().

{ return NodeHI.GetDat().IsOutNId(NId); }

Here is the caller graph for this function:

template<class TNodeData, class TEdgeData>
const TNodeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::operator() ( ) const [inline]

Definition at line 523 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::NodeHI.

{ return NodeHI.GetDat().NodeDat; }
template<class TNodeData, class TEdgeData>
TNodeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::operator() ( ) [inline]

Definition at line 524 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::NodeHI.

{ return NodeHI.GetDat().GetDat(); }
template<class TNodeData, class TEdgeData>
TNodeI& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::operator++ ( int  ) [inline]

Increment iterator.

Definition at line 492 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::NodeHI.

{ NodeHI++;  return *this; }
template<class TNodeData, class TEdgeData>
bool TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::operator< ( const TNodeI NodeI) const [inline]

Definition at line 493 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::NodeHI.

{ return NodeHI < NodeI.NodeHI; }
template<class TNodeData, class TEdgeData>
TNodeI& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::operator= ( const TNodeI NodeI) [inline]

Definition at line 490 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::Net, and TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::NodeHI.

{ NodeHI=NodeI.NodeHI; Net=NodeI.Net; return *this; }
template<class TNodeData, class TEdgeData>
bool TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::operator== ( const TNodeI NodeI) const [inline]

Definition at line 494 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::NodeHI.

{ return NodeHI == NodeI.NodeHI; }

Friends And Related Function Documentation

template<class TNodeData, class TEdgeData>
friend class TNodeEDatNet< TNodeData, TEdgeData > [friend]

Definition at line 540 of file network.h.


Member Data Documentation


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