SNAP Library 2.2, Developer Reference
2014-03-11 19:15:55
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 82 of file graph.h.
References NodeHI.
Referenced by TSnap::GetCmnNbrs< PUNGraph >(), TLocClustStat::TCutInfo::GetFracDegOut(), TAGMUtil::GetNbhCom(), TCliqueOverlap::GetNbrs(), TCliqueOverlap::GetNodeIdWithMaxDeg(), TAGMFast::GradientForOneVar(), TAGMFast::GradientForRow(), TCesna::GradientForRow(), TAGMFast::HessianForOneVar(), TAGMFit::JoinCom(), TAGMFit::LeaveCom(), TAGMFast::LikelihoodForOneVar(), TAGMFast::LikelihoodForRow(), TCesna::LikelihoodForRow(), TCliqueOverlap::MaxNbrsInCANDNodeId(), TAGMFast::MLEGradAscent(), TAGMFast::MLEGradAscentParallel(), TCesna::MLEGradAscentParallel(), TAGMFast::MLENewton(), TAGMFast::NeighborComInit(), TAGMFit::NeighborComInit(), TCesna::NeighborComInit(), TAGMFast::RandomInit(), TAGMFit::RandomInit(), TCesna::RandomInit(), TAGMFit::SeekJoin(), TAGMFit::SeekLeave(), and TAGMFit::SeekSwitch().
{ return NodeHI.GetDat().GetDeg(); }
int TUNGraph::TNodeI::GetId | ( | ) | const [inline] |
Returns ID of the current node.
Definition at line 80 of file graph.h.
References NodeHI.
Referenced by TUNGraph::AddNode(), TUNGraph::BegEI(), TSnap::GetBetweennessCentr(), TUNGraph::TEdgeI::GetSrcNId(), TAGMFit::NeighborComInit(), and TAGMFit::RandomInit().
{ 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 91 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 101 of file graph.h.
References NodeHI.
Referenced by TSnap::GetCmnNbrs< PUNGraph >(), TLocClustStat::TCutInfo::GetFracDegOut(), TAGMUtil::GetNbhCom(), TCliqueOverlap::GetNbrs(), TAGMFast::GradientForOneVar(), TAGMFast::GradientForRow(), TCesna::GradientForRow(), TAGMFast::HessianForOneVar(), TAGMFit::JoinCom(), TAGMFit::LeaveCom(), TAGMFast::LikelihoodForOneVar(), TAGMFast::LikelihoodForRow(), TCesna::LikelihoodForRow(), TCliqueOverlap::MaxNbrsInCANDNodeId(), TAGMFast::MLEGradAscent(), TAGMFast::MLEGradAscentParallel(), TCesna::MLEGradAscentParallel(), TAGMFast::MLENewton(), TAGMFast::NeighborComInit(), TAGMFit::NeighborComInit(), TCesna::NeighborComInit(), TAGMFit::RandomInit(), TAGMFit::SeekJoin(), TAGMFit::SeekLeave(), and TAGMFit::SeekSwitch().
{ 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 86 of file graph.h.
References NodeHI.
Referenced by TSnap::TSnapDetail::_GirvanNewmanGetModularity(), TLocClust::ApproxPageRank(), TLocClustStat::BagOfWhiskers(), TLocClustStat::BagOfWhiskers2(), TUNGraph::BegEI(), TUndirFFire::BurnGeoFire(), TSnap::GetBetweennessCentr(), TAGMUtil::GetConductance(), 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 96 of file graph.h.
References NodeHI.
Referenced by TLocClust::ApproxPageRank(), TUNGraph::BegEI(), TUndirFFire::BurnGeoFire(), TSnap::GetBetweennessCentr(), TAGMUtil::GetConductance(), 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 66 of file graph.h.
Referenced by GetDeg(), TUNGraph::GetEI(), GetId(), GetInDeg(), GetInNId(), GetNbrNId(), GetOutDeg(), GetOutNId(), IsInNId(), IsNbrNId(), IsOutNId(), operator++(), operator<(), operator=(), and operator==().