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
|
Node iterator. Only forward iteration (operator++) is supported. More...
#include <network.h>
Public Member Functions | |
TNodeI () | |
TNodeI (const THashIter &NodeHIter, const TNodeEDatNet *NetPt) | |
TNodeI (const TNodeI &NodeI) | |
TNodeI & | operator= (const TNodeI &NodeI) |
TNodeI & | operator++ (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 |
TNodeEDatNet * | Net |
Friends | |
class | TNodeEDatNet< TNodeData, TEdgeData > |
Node iterator. Only forward iteration (operator++) is supported.
typedef THash<TInt, TNode>::TIter TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::THashIter [private] |
TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::TNodeI | ( | ) | [inline] |
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) { }
TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::TNodeI | ( | const TNodeI & | NodeI | ) | [inline] |
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(); }
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(); }
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(); }
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(); }
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(); }
TEdgeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetInEDat | ( | const int & | EdgeN | ) | [inline] |
Definition at line 536 of file network.h.
References TNodeEDatNet< TNodeData, TEdgeData >::GetEDat(), TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetId(), TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetInNId(), and TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::Net.
Referenced by TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetNbrEDat().
const TEdgeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetInEDat | ( | const int & | EdgeN | ) | const [inline] |
Definition at line 537 of file network.h.
References TNodeEDatNet< TNodeData, TEdgeData >::GetEDat(), TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetId(), TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetInNId(), and TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::Net.
const TNodeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetInNDat | ( | const int & | NodeN | ) | const [inline] |
Definition at line 529 of file network.h.
References TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetInNId(), TNodeEDatNet< TNodeData, TEdgeData >::GetNDat(), and TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::Net.
TNodeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetInNDat | ( | const int & | NodeN | ) | [inline] |
Definition at line 530 of file network.h.
References TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetInNId(), TNodeEDatNet< TNodeData, TEdgeData >::GetNDat(), and TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::Net.
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); }
TEdgeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetNbrEDat | ( | const int & | EdgeN | ) | [inline] |
Definition at line 538 of file network.h.
References TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetInEDat(), TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetOutDeg(), and TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetOutEDat().
{ return EdgeN<GetOutDeg() ? GetOutEDat(EdgeN) : GetInEDat(EdgeN-GetOutDeg()); }
const TEdgeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetNbrEDat | ( | const int & | EdgeN | ) | const [inline] |
Definition at line 539 of file network.h.
References TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetInEDat(), TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetOutDeg(), and TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetOutEDat().
{ return EdgeN<GetOutDeg() ? GetOutEDat(EdgeN) : GetInEDat(EdgeN-GetOutDeg()); }
const TNodeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetNbrNDat | ( | const int & | NodeN | ) | const [inline] |
Definition at line 531 of file network.h.
References TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetNbrNId(), TNodeEDatNet< TNodeData, TEdgeData >::GetNDat(), and TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::Net.
TNodeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetNbrNDat | ( | const int & | NodeN | ) | [inline] |
Definition at line 532 of file network.h.
References TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetNbrNId(), TNodeEDatNet< TNodeData, TEdgeData >::GetNDat(), and TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::Net.
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); }
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(); }
TEdgeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetOutEDat | ( | const int & | EdgeN | ) | [inline] |
Definition at line 534 of file network.h.
References TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::NodeHI.
Referenced by TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::GetDat(), TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetNbrEDat(), and TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::operator()().
{ return NodeHI.GetDat().GetOutEDat(EdgeN); }
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); }
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().
TNodeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetOutNDat | ( | const int & | NodeN | ) | [inline] |
Definition at line 528 of file network.h.
References TNodeEDatNet< TNodeData, TEdgeData >::GetNDat(), TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetOutNId(), and TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::Net.
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); }
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); }
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().
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); }
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; }
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(); }
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; }
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; }
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.
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; }
friend class TNodeEDatNet< TNodeData, TEdgeData > [friend] |
TNodeEDatNet* TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::Net [private] |
Definition at line 485 of file network.h.
Referenced by TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetInEDat(), TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetInNDat(), TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetNbrNDat(), TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetOutNDat(), and TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::operator=().
THashIter TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::NodeHI [private] |
Definition at line 484 of file network.h.
Referenced by TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetDat(), TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetDeg(), TNodeEDatNet< TNodeData, TEdgeData >::GetEI(), TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetId(), TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetInDeg(), TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetInNId(), TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetNbrNId(), TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetOutDeg(), TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetOutEDat(), TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetOutNId(), TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::IsInNId(), TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::IsOutNId(), TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::operator()(), TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::operator++(), TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::operator<(), TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::operator=(), and TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::operator==().