SNAP Library , Developer Reference
2013-01-07 14:03:36
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
Node iterator. Only forward iteration (operator++) is supported. More...
#include <graph.h>
Public Member Functions | |
TNodeI () | |
TNodeI (const THashIter &NodeHIter) | |
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 (returns same as value GetDeg() since the graph is undirected). | |
int | GetOutDeg () const |
Returns out-degree of the current node (returns same as value GetDeg() since the graph is undirected). | |
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. | |
Private Types | |
typedef THash< TInt, TNode >::TIter | THashIter |
Private Attributes | |
THashIter | NodeHI |
Friends | |
class | TUNGraph |
Node iterator. Only forward iteration (operator++) is supported.
typedef THash<TInt, TNode>::TIter TUNGraph::TNodeI::THashIter [private] |
TUNGraph::TNodeI::TNodeI | ( | ) | [inline] |
TUNGraph::TNodeI::TNodeI | ( | const THashIter & | NodeHIter | ) | [inline] |
TUNGraph::TNodeI::TNodeI | ( | const TNodeI & | NodeI | ) | [inline] |
int TUNGraph::TNodeI::GetDeg | ( | ) | const [inline] |
Returns degree of the current node.
Definition at line 81 of file graph.h.
References NodeHI.
Referenced by TSnap::GetCmnNbrs< PUNGraph >(), TLocClustStat::TCutInfo::GetFracDegOut(), TCliqueOverlap::GetNbrs(), TCliqueOverlap::GetNodeIdWithMaxDeg(), and TCliqueOverlap::MaxNbrsInCANDNodeId().
{ return NodeHI.GetDat().GetDeg(); }
int TUNGraph::TNodeI::GetId | ( | ) | const [inline] |
Returns ID of the current node.
Definition at line 79 of file graph.h.
References NodeHI.
Referenced by TUNGraph::AddNode(), TUNGraph::BegEI(), TSnap::GetBetweennessCentr(), and TUNGraph::TEdgeI::GetSrcNId().
{ return NodeHI.GetDat().GetId(); }
int TUNGraph::TNodeI::GetInDeg | ( | ) | const [inline] |
int TUNGraph::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(). Since the graph is undirected GetInNId(), GetOutNId() and GetNbrNId() all give the same output.
Definition at line 90 of file graph.h.
References NodeHI.
{ return NodeHI.GetDat().GetInNId(NodeN); }
int TUNGraph::TNodeI::GetNbrNId | ( | const int & | NodeN | ) | const [inline] |
Returns ID of NodeN-th neighboring node.
Range of NodeN: 0 <= NodeN < GetNbrDeg(). Since the graph is undirected GetInNId(), GetOutNId() and GetNbrNId() all give the same output.
Definition at line 100 of file graph.h.
References NodeHI.
Referenced by TSnap::GetCmnNbrs< PUNGraph >(), TLocClustStat::TCutInfo::GetFracDegOut(), TCliqueOverlap::GetNbrs(), and TCliqueOverlap::MaxNbrsInCANDNodeId().
{ return NodeHI.GetDat().GetNbrNId(NodeN); }
int TUNGraph::TNodeI::GetOutDeg | ( | ) | const [inline] |
Returns out-degree of the current node (returns same as value GetDeg() since the graph is undirected).
Definition at line 85 of file graph.h.
References NodeHI.
Referenced by TSnap::TSnapDetail::_GirvanNewmanGetModularity(), TLocClust::ApproxPageRank(), TLocClustStat::BagOfWhiskers(), TLocClustStat::BagOfWhiskers2(), TUNGraph::BegEI(), TUndirFFire::BurnGeoFire(), TSnap::GetBetweennessCentr(), TLocClust::GetCutStat(), TSnap::GetSubGraph(), TSnap::TSnapDetail::TCNMQMatrix::Init(), TUNGraph::TEdgeI::operator++(), and TLocClust::SupportSweep().
{ return NodeHI.GetDat().GetOutDeg(); }
int TUNGraph::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(). Since the graph is undirected GetInNId(), GetOutNId() and GetNbrNId() all give the same output.
Definition at line 95 of file graph.h.
References NodeHI.
Referenced by TLocClust::ApproxPageRank(), TUNGraph::BegEI(), TUndirFFire::BurnGeoFire(), TSnap::GetBetweennessCentr(), TLocClust::GetCutStat(), TUNGraph::TEdgeI::GetDstNId(), TSnap::GetSubGraph(), and TLocClust::SupportSweep().
{ return NodeHI.GetDat().GetOutNId(NodeN); }
bool TUNGraph::TNodeI::IsInNId | ( | const int & | NId | ) | const [inline] |
bool TUNGraph::TNodeI::IsNbrNId | ( | const int & | NId | ) | const [inline] |
bool TUNGraph::TNodeI::IsOutNId | ( | const int & | NId | ) | const [inline] |
TNodeI& TUNGraph::TNodeI::operator++ | ( | int | ) | [inline] |
bool TUNGraph::TNodeI::operator< | ( | const TNodeI & | NodeI | ) | const [inline] |
bool TUNGraph::TNodeI::operator== | ( | const TNodeI & | NodeI | ) | const [inline] |
THashIter TUNGraph::TNodeI::NodeHI [private] |
Definition at line 65 of file graph.h.
Referenced by GetDeg(), TUNGraph::GetEI(), GetId(), GetInDeg(), GetInNId(), GetNbrNId(), GetOutDeg(), GetOutNId(), IsInNId(), IsNbrNId(), IsOutNId(), operator++(), operator<(), operator=(), and operator==().