SNAP Library 4.1, Developer Reference
2018-07-26 16:30:42
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. More... | |
TNodeI & | operator-- (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 | TNGraph |
Node iterator. Only forward iteration (operator++) is supported.
|
private |
|
inline |
|
inline |
Returns degree of the current node, the sum of in-degree and out-degree.
Definition at line 398 of file graph.h.
References NodeHI.
Referenced by TSnap::GetEgonet(), TSubGraphEnum< TGraphCounter >::GetSubGraphs(), TSubGraphEnum< TGraphCounter >::GetSubGraphs_recursive(), TSnap::TSnapDetail::inComp(), TCoda::MLEGradAscentParallel(), TCoda::NeighborComInit(), TCodaAnalyzer::Net2ModeCommunities(), and TKroneckerLL::SetBestDegPerm().
|
inline |
Returns ID of the current node.
Definition at line 396 of file graph.h.
References NodeHI.
Referenced by TNGraph::AddNode(), TGHash< TDat >::GetNodeMap(), TNGraph::TEdgeI::GetSrcNId(), higherDeg(), KNNJaccard(), and TSubGraphsEnum::RecurBfs().
|
inline |
Returns in-degree of the current node.
Definition at line 400 of file graph.h.
References NodeHI.
Referenced by anonymous_namespace{randwalk.h}::ApproxContributionsBalanced(), TForestFire::BurnExpFire(), TForestFire::BurnGeoFire(), TempMotifCounter::GetAllNeighbors(), TSnap::GetEgonet(), TCascade::GetProb(), TCoda::GradientForNode(), KNNJaccard(), KNNJaccardParallel(), TCoda::LikelihoodForNode(), MergeNbrs(), TCoda::MLEGradAscent(), TCoda::MLEGradAscentParallel(), TCoda::NeighborComInit(), TCodaAnalyzer::Net2ModeCommunities(), TKroneckerLL::NodeDLLDelta(), TKroneckerLL::NodeLLDelta(), TCoda::RandomInit(), TSubGraphsEnum::RecurBfs(), TSubGraphsEnum::RecurBfs1(), TSnap::ReebRefine(), TSnap::ReebSimplify(), and TMAGFitBern::UpdateApxPhiMI().
|
inline |
Returns ID of NodeN-th in-node (the node pointing to the current node).
Range of NodeN: 0 <= NodeN < GetInDeg().
Definition at line 408 of file graph.h.
References NodeHI.
Referenced by anonymous_namespace{randwalk.h}::ApproxContributionsBalanced(), TForestFire::BurnExpFire(), TForestFire::BurnGeoFire(), TempMotifCounter::GetAllNeighbors(), TSnap::GetEgonet(), TCascade::GetProb(), TCoda::GradientForNode(), TCoda::LikelihoodForNode(), MergeNbrs(), TCoda::MLEGradAscent(), TCoda::MLEGradAscentParallel(), TKroneckerLL::NodeDLLDelta(), TKroneckerLL::NodeLLDelta(), TSubGraphsEnum::RecurBfs(), TSubGraphsEnum::RecurBfs1(), TSnap::ReebRefine(), TSnap::ReebSimplify(), and TMAGFitBern::UpdateApxPhiMI().
|
inline |
Returns ID of NodeN-th neighboring node.
Range of NodeN: 0 <= NodeN < GetNbrDeg().
Definition at line 416 of file graph.h.
References NodeHI.
Referenced by TSnap::GetEgonet(), TGraphEnumUtils::GetIndGraph(), TSubGraphEnum< TGraphCounter >::GetSubGraphs(), TSubGraphEnum< TGraphCounter >::GetSubGraphs_recursive(), TCoda::MLEGradAscentParallel(), and TCoda::NeighborComInit().
|
inline |
Returns out-degree of the current node.
Definition at line 402 of file graph.h.
References NodeHI.
Referenced by anonymous_namespace{randwalk.h}::ApproxContributionsBalanced(), TNGraph::BegEI(), MotifCluster::BifanMotifAdjacency(), TForestFire::BurnExpFire(), TForestFire::BurnGeoFire(), TKroneckerLL::CalcApxGraphDLL(), TKroneckerLL::CalcApxGraphLL(), TKroneckerLL::CalcGraphLL(), TSnap::CascFind(), TSnap::CascFindMP(), TNetInfBs::GenCascade(), TSnap::GenCopyModel(), TempMotifCounter::GetAllNeighbors(), TSnap::GetEgonet(), TGraphEnumUtils::GetIndGraph(), TSnap::GetSubGraph(), TCoda::GradientForNode(), higherDeg(), JaccardSim(), KNNJaccard(), KNNJaccardParallel(), TCoda::LikelihoodForNode(), TCoda::MLEGradAscent(), TCoda::MLEGradAscentParallel(), TCoda::NeighborComInit(), TCodaAnalyzer::Net2ModeCommunities(), TKroneckerLL::NodeDLLDelta(), TKroneckerLL::NodeLLDelta(), TNGraph::TEdgeI::operator++(), TCoda::RandomInit(), TSubGraphsEnum::RecurBfs(), TSubGraphsEnum::RecurBfs1(), TSnap::ReebRefine(), TSnap::ReebSimplify(), TSnap::SamplePersonalizedPageRank(), and TMAGFitBern::UpdateApxPhiMI().
|
inline |
Returns ID of NodeN-th out-node (the node the current node points to).
Range of NodeN: 0 <= NodeN < GetOutDeg().
Definition at line 412 of file graph.h.
References NodeHI.
Referenced by MotifCluster::BifanMotifAdjacency(), TForestFire::BurnExpFire(), TForestFire::BurnGeoFire(), TKroneckerLL::CalcApxGraphDLL(), TKroneckerLL::CalcApxGraphLL(), TKroneckerLL::CalcGraphLL(), TSnap::CascFind(), TSnap::CascFindMP(), TNetInfBs::GenCascade(), TSnap::GenCopyModel(), TempMotifCounter::GetAllNeighbors(), TNGraph::TEdgeI::GetDstNId(), TSnap::GetEgonet(), TSnap::GetSubGraph(), TCoda::GradientForNode(), JaccardSim(), KNNJaccard(), KNNJaccardParallel(), TCoda::LikelihoodForNode(), TCoda::MLEGradAscent(), TCoda::MLEGradAscentParallel(), TCodaAnalyzer::Net2ModeCommunities(), TKroneckerLL::NodeDLLDelta(), TKroneckerLL::NodeLLDelta(), TSubGraphsEnum::RecurBfs(), TSubGraphsEnum::RecurBfs1(), TSnap::ReebRefine(), TSnap::ReebSimplify(), TSnap::SamplePersonalizedPageRank(), and TMAGFitBern::UpdateApxPhiMI().
|
inline |
Tests whether node with ID NId points to the current node.
Definition at line 418 of file graph.h.
References NodeHI.
Referenced by IsNbrNId().
|
inline |
Tests whether node with ID NId is a neighbor of the current node.
Definition at line 422 of file graph.h.
References IsInNId(), and IsOutNId().
|
inline |
Tests whether the current node points to node with ID NId.
Definition at line 420 of file graph.h.
References NodeHI.
Referenced by TempMotifCounter::GetAllNeighbors(), and IsNbrNId().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
Definition at line 382 of file graph.h.
Referenced by GetDeg(), TNGraph::GetEI(), GetId(), GetInDeg(), GetInNId(), GetNbrNId(), GetOutDeg(), GetOutNId(), IsInNId(), IsOutNId(), operator++(), operator--(), operator<(), operator=(), operator==(), and SortNIdV().