SNAP Library 6.0, Developer Reference  2020-12-09 16:24:20
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
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:

Public Member Functions

 TNodeI ()
 
 TNodeI (const THashIter &NodeHIter, const TNodeEDatNet *NetPt)
 
 TNodeI (const TNodeI &NodeI)
 
TNodeIoperator= (const TNodeI &NodeI)
 
TNodeIoperator++ (int)
 Increment 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. More...
 
int GetInDeg () const
 Returns in-degree of the current node. More...
 
int GetOutDeg () const
 Returns out-degree 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...
 
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 537 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 539 of file network.h.

Constructor & Destructor Documentation

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

Definition at line 543 of file network.h.

543 : NodeHI(), Net(NULL) { }
TNodeEDatNet * Net
Definition: network.h:541
THashIter NodeHI
Definition: network.h:540
template<class TNodeData, class TEdgeData>
TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::TNodeI ( const THashIter NodeHIter,
const TNodeEDatNet NetPt 
)
inline

Definition at line 544 of file network.h.

544 : NodeHI(NodeHIter), Net((TNodeEDatNet *) NetPt) { }
TNodeEDatNet * Net
Definition: network.h:541
Node Edge Network (directed graph, TNGraph with data on nodes and edges).
Definition: network.h:491
THashIter NodeHI
Definition: network.h:540
template<class TNodeData, class TEdgeData>
TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::TNodeI ( const TNodeI NodeI)
inline

Definition at line 545 of file network.h.

545 : NodeHI(NodeI.NodeHI), Net(NodeI.Net) { }
TNodeEDatNet * Net
Definition: network.h:541
THashIter NodeHI
Definition: network.h:540

Member Function Documentation

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

Definition at line 581 of file network.h.

Referenced by PreprocessNode(), and PreprocessTransitionProbs().

581 { return NodeHI.GetDat().GetDat(); }
THashIter NodeHI
Definition: network.h:540

Here is the caller graph for this function:

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

Definition at line 582 of file network.h.

582 { return NodeHI.GetDat().GetDat(); }
THashIter NodeHI
Definition: network.h:540
template<class TNodeData, class TEdgeData>
int TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetDeg ( ) const
inline

Returns degree of the current node.

Definition at line 555 of file network.h.

555 { return NodeHI.GetDat().GetDeg(); }
THashIter NodeHI
Definition: network.h:540
template<class TNodeData, class TEdgeData>
int TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetId ( ) const
inline

Returns ID of the current node.

Definition at line 553 of file network.h.

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

553 { return NodeHI.GetDat().GetId(); }
THashIter NodeHI
Definition: network.h:540

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 557 of file network.h.

557 { return NodeHI.GetDat().GetInDeg(); }
THashIter NodeHI
Definition: network.h:540
template<class TNodeData, class TEdgeData>
TEdgeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetInEDat ( const int &  EdgeN)
inline

Definition at line 592 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::GetEDat(), TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetId(), and TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetInNId().

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

592 { return Net->GetEDat(GetInNId(EdgeN), GetId()); }
int GetInNId(const int &NodeN) const
Returns ID of NodeN-th in-node (the node pointing to the current node).
Definition: network.h:563
bool GetEDat(const int &SrcNId, const int &DstNId, TEdgeData &EdgeDat) const
Returns edge data in Data for the edge from node IDs SrcNId to DstNId.
Definition: network.h:953
TNodeEDatNet * Net
Definition: network.h:541
int GetId() const
Returns ID of the current node.
Definition: network.h:553

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 593 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::GetEDat(), TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetId(), and TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetInNId().

593 { return Net->GetEDat(GetInNId(EdgeN), GetId()); }
int GetInNId(const int &NodeN) const
Returns ID of NodeN-th in-node (the node pointing to the current node).
Definition: network.h:563
bool GetEDat(const int &SrcNId, const int &DstNId, TEdgeData &EdgeDat) const
Returns edge data in Data for the edge from node IDs SrcNId to DstNId.
Definition: network.h:953
TNodeEDatNet * Net
Definition: network.h:541
int GetId() const
Returns ID of the current node.
Definition: network.h:553

Here is the call graph for this function:

template<class TNodeData, class TEdgeData>
const TNodeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetInNDat ( const int &  NodeN) const
inline

Definition at line 585 of file network.h.

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

585 { return Net->GetNDat(GetInNId(NodeN)); }
int GetInNId(const int &NodeN) const
Returns ID of NodeN-th in-node (the node pointing to the current node).
Definition: network.h:563
TNodeData & GetNDat(const int &NId)
Returns node data for the node of ID NId in the network.
Definition: network.h:720
TNodeEDatNet * Net
Definition: network.h:541

Here is the call graph for this function:

template<class TNodeData, class TEdgeData>
TNodeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetInNDat ( const int &  NodeN)
inline

Definition at line 586 of file network.h.

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

586 { return Net->GetNDat(GetInNId(NodeN)); }
int GetInNId(const int &NodeN) const
Returns ID of NodeN-th in-node (the node pointing to the current node).
Definition: network.h:563
TNodeData & GetNDat(const int &NId)
Returns node data for the node of ID NId in the network.
Definition: network.h:720
TNodeEDatNet * Net
Definition: network.h:541

Here is the call graph for this function:

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 563 of file network.h.

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

563 { return NodeHI.GetDat().GetInNId(NodeN); }
THashIter NodeHI
Definition: network.h:540

Here is the caller graph for this function:

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

Definition at line 594 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetInEDat(), TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetOutDeg(), and TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetOutEDat().

594 { return EdgeN<GetOutDeg() ? GetOutEDat(EdgeN) : GetInEDat(EdgeN-GetOutDeg()); }
TEdgeData & GetInEDat(const int &EdgeN)
Definition: network.h:592
int GetOutDeg() const
Returns out-degree of the current node.
Definition: network.h:559
TEdgeData & GetOutEDat(const int &EdgeN)
Definition: network.h:590

Here is the call graph for this function:

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

Definition at line 595 of file network.h.

References TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetInEDat(), TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetOutDeg(), and TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetOutEDat().

595 { return EdgeN<GetOutDeg() ? GetOutEDat(EdgeN) : GetInEDat(EdgeN-GetOutDeg()); }
TEdgeData & GetInEDat(const int &EdgeN)
Definition: network.h:592
int GetOutDeg() const
Returns out-degree of the current node.
Definition: network.h:559
TEdgeData & GetOutEDat(const int &EdgeN)
Definition: network.h:590

Here is the call graph for this function:

template<class TNodeData, class TEdgeData>
const TNodeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetNbrNDat ( const int &  NodeN) const
inline

Definition at line 587 of file network.h.

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

587 { return Net->GetNDat(GetNbrNId(NodeN)); }
TNodeData & GetNDat(const int &NId)
Returns node data for the node of ID NId in the network.
Definition: network.h:720
int GetNbrNId(const int &NodeN) const
Returns ID of NodeN-th neighboring node.
Definition: network.h:571
TNodeEDatNet * Net
Definition: network.h:541

Here is the call graph for this function:

template<class TNodeData, class TEdgeData>
TNodeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetNbrNDat ( const int &  NodeN)
inline

Definition at line 588 of file network.h.

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

588 { return Net->GetNDat(GetNbrNId(NodeN)); }
TNodeData & GetNDat(const int &NId)
Returns node data for the node of ID NId in the network.
Definition: network.h:720
int GetNbrNId(const int &NodeN) const
Returns ID of NodeN-th neighboring node.
Definition: network.h:571
TNodeEDatNet * Net
Definition: network.h:541

Here is the call graph for this function:

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 571 of file network.h.

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

571 { return NodeHI.GetDat().GetNbrNId(NodeN); }
THashIter NodeHI
Definition: network.h:540

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 559 of file network.h.

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

559 { return NodeHI.GetDat().GetOutDeg(); }
THashIter NodeHI
Definition: network.h:540

Here is the caller graph for this function:

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

Definition at line 590 of file network.h.

Referenced by TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::GetDat(), TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetNbrEDat(), and TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::operator()().

590 { return NodeHI.GetDat().GetOutEDat(EdgeN); }
THashIter NodeHI
Definition: network.h:540

Here is the caller graph for this function:

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

Definition at line 591 of file network.h.

591 { return NodeHI.GetDat().GetOutEDat(EdgeN); }
THashIter NodeHI
Definition: network.h:540
template<class TNodeData, class TEdgeData>
const TNodeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetOutNDat ( const int &  NodeN) const
inline

Definition at line 583 of file network.h.

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

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

583 { return Net->GetNDat(GetOutNId(NodeN)); }
TNodeData & GetNDat(const int &NId)
Returns node data for the node of ID NId in the network.
Definition: network.h:720
TNodeEDatNet * Net
Definition: network.h:541
int GetOutNId(const int &NodeN) const
Returns ID of NodeN-th out-node (the node the current node points to).
Definition: network.h:567

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

Definition at line 584 of file network.h.

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

584 { return Net->GetNDat(GetOutNId(NodeN)); }
TNodeData & GetNDat(const int &NId)
Returns node data for the node of ID NId in the network.
Definition: network.h:720
TNodeEDatNet * Net
Definition: network.h:541
int GetOutNId(const int &NodeN) const
Returns ID of NodeN-th out-node (the node the current node points to).
Definition: network.h:567

Here is the call graph for this function:

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 567 of file network.h.

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

567 { return NodeHI.GetDat().GetOutNId(NodeN); }
THashIter NodeHI
Definition: network.h:540

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 573 of file network.h.

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

573 { return NodeHI.GetDat().IsInNId(NId); }
THashIter NodeHI
Definition: network.h:540

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 577 of file network.h.

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

577 { return IsOutNId(NId) || IsInNId(NId); }
bool IsInNId(const int &NId) const
Tests whether node with ID NId points to the current node.
Definition: network.h:573
bool IsOutNId(const int &NId) const
Tests whether the current node points to node with ID NId.
Definition: network.h:575

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 575 of file network.h.

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

575 { return NodeHI.GetDat().IsOutNId(NId); }
THashIter NodeHI
Definition: network.h:540

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 579 of file network.h.

579 { return NodeHI.GetDat().NodeDat; }
THashIter NodeHI
Definition: network.h:540
template<class TNodeData, class TEdgeData>
TNodeData& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::operator() ( )
inline

Definition at line 580 of file network.h.

580 { return NodeHI.GetDat().GetDat(); }
THashIter NodeHI
Definition: network.h:540
template<class TNodeData, class TEdgeData>
TNodeI& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::operator++ ( int  )
inline

Increment iterator.

Definition at line 548 of file network.h.

548 { NodeHI++; return *this; }
THashIter NodeHI
Definition: network.h:540
template<class TNodeData, class TEdgeData>
bool TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::operator< ( const TNodeI NodeI) const
inline

Definition at line 549 of file network.h.

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

549 { return NodeHI < NodeI.NodeHI; }
THashIter NodeHI
Definition: network.h:540
template<class TNodeData, class TEdgeData>
TNodeI& TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::operator= ( const TNodeI NodeI)
inline

Definition at line 546 of file network.h.

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

546 { NodeHI=NodeI.NodeHI; Net=NodeI.Net; return *this; }
TNodeEDatNet * Net
Definition: network.h:541
THashIter NodeHI
Definition: network.h:540
template<class TNodeData, class TEdgeData>
bool TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::operator== ( const TNodeI NodeI) const
inline

Definition at line 550 of file network.h.

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

550 { return NodeHI == NodeI.NodeHI; }
THashIter NodeHI
Definition: network.h:540

Friends And Related Function Documentation

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

Definition at line 596 of file network.h.

Member Data Documentation

template<class TNodeData, class TEdgeData>
TNodeEDatNet* TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::Net
private

Definition at line 541 of file network.h.

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


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