SNAP Library 4.0, Developer Reference  2017-07-27 13:18:06
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TBigNet< TNodeData, IsDir >::TEdgeI Class Reference

Edge iterator. More...

#include <bignet.h>

Collaboration diagram for TBigNet< TNodeData, IsDir >::TEdgeI:

Public Member Functions

 TEdgeI ()
 
 TEdgeI (const TNodeI &NodeI, const TNodeI &EndNodeI, const int &EdgeN=0)
 
 TEdgeI (const TEdgeI &EdgeI)
 
TEdgeIoperator= (const TEdgeI &EdgeI)
 
TEdgeIoperator++ (int)
 
bool operator< (const TEdgeI &EdgeI) const
 
bool operator== (const TEdgeI &EdgeI) const
 
int GetId () const
 
int GetSrcNId () const
 
int GetDstNId () const
 
const TNodeData & GetSrcNDat () const
 
TNodeData & GetDstNDat ()
 

Private Attributes

TNodeI CurNode
 
TNodeI EndNode
 
int CurEdge
 

Friends

class TNodeNet< TNodeData >
 

Detailed Description

template<class TNodeData, bool IsDir>
class TBigNet< TNodeData, IsDir >::TEdgeI

Edge iterator.

Only forward iteration (operator++) is supported.

Definition at line 97 of file bignet.h.

Constructor & Destructor Documentation

template<class TNodeData, bool IsDir>
TBigNet< TNodeData, IsDir >::TEdgeI::TEdgeI ( )
inline

Definition at line 102 of file bignet.h.

102 : CurNode(), EndNode(), CurEdge(0) { }
TNodeI EndNode
Definition: bignet.h:99
TNodeI CurNode
Definition: bignet.h:99
template<class TNodeData, bool IsDir>
TBigNet< TNodeData, IsDir >::TEdgeI::TEdgeI ( const TNodeI NodeI,
const TNodeI EndNodeI,
const int &  EdgeN = 0 
)
inline

Definition at line 103 of file bignet.h.

103 : CurNode(NodeI), EndNode(EndNodeI), CurEdge(0) { }
TNodeI EndNode
Definition: bignet.h:99
TNodeI CurNode
Definition: bignet.h:99
template<class TNodeData, bool IsDir>
TBigNet< TNodeData, IsDir >::TEdgeI::TEdgeI ( const TEdgeI EdgeI)
inline

Definition at line 104 of file bignet.h.

104 : CurNode(EdgeI.CurNode), EndNode(EdgeI.EndNode), CurEdge(EdgeI.CurEdge) { }
TNodeI EndNode
Definition: bignet.h:99
TNodeI CurNode
Definition: bignet.h:99

Member Function Documentation

template<class TNodeData, bool IsDir>
TNodeData& TBigNet< TNodeData, IsDir >::TEdgeI::GetDstNDat ( )
inline

Definition at line 114 of file bignet.h.

References TBigNet< TNodeData, IsDir >::TEdgeI::CurEdge, and TBigNet< TNodeData, IsDir >::TEdgeI::CurNode.

114 { return CurNode.GetOutNDat(CurEdge); }
TNodeI CurNode
Definition: bignet.h:99
template<class TNodeData, bool IsDir>
int TBigNet< TNodeData, IsDir >::TEdgeI::GetDstNId ( ) const
inline

Definition at line 112 of file bignet.h.

References TBigNet< TNodeData, IsDir >::TEdgeI::CurEdge, TBigNet< TNodeData, IsDir >::TEdgeI::CurNode, and TBigNet< TNodeData, IsDir >::TNodeI::GetOutNId().

112 { return CurNode.GetOutNId(CurEdge); }
TNodeI CurNode
Definition: bignet.h:99
int GetOutNId(const int &NodeN) const
Definition: bignet.h:74

Here is the call graph for this function:

template<class TNodeData, bool IsDir>
int TBigNet< TNodeData, IsDir >::TEdgeI::GetId ( ) const
inline

Definition at line 110 of file bignet.h.

110 { return -1; }
template<class TNodeData, bool IsDir>
const TNodeData& TBigNet< TNodeData, IsDir >::TEdgeI::GetSrcNDat ( ) const
inline

Definition at line 113 of file bignet.h.

References TBigNet< TNodeData, IsDir >::TEdgeI::CurNode.

113 { return CurNode.GetNDat(); }
TNodeI CurNode
Definition: bignet.h:99
template<class TNodeData, bool IsDir>
int TBigNet< TNodeData, IsDir >::TEdgeI::GetSrcNId ( ) const
inline

Definition at line 111 of file bignet.h.

References TBigNet< TNodeData, IsDir >::TEdgeI::CurNode, and TBigNet< TNodeData, IsDir >::TNodeI::GetId().

111 { return CurNode.GetId(); }
TNodeI CurNode
Definition: bignet.h:99
int GetId() const
Definition: bignet.h:69

Here is the call graph for this function:

template<class TNodeData, bool IsDir>
TEdgeI& TBigNet< TNodeData, IsDir >::TEdgeI::operator++ ( int  )
inline

Definition at line 106 of file bignet.h.

References TBigNet< TNodeData, IsDir >::TEdgeI::CurEdge, TBigNet< TNodeData, IsDir >::TEdgeI::CurNode, TBigNet< TNodeData, IsDir >::TEdgeI::EndNode, and TBigNet< TNodeData, IsDir >::TNodeI::GetOutDeg().

106  { CurEdge++; if (CurEdge >= CurNode.GetOutDeg()) { CurEdge=0; CurNode++;
107  while (CurNode < EndNode && CurNode.GetOutDeg()==0) { CurNode++; } } return *this; }
TNodeI EndNode
Definition: bignet.h:99
int GetOutDeg() const
Definition: bignet.h:72
TNodeI CurNode
Definition: bignet.h:99

Here is the call graph for this function:

template<class TNodeData, bool IsDir>
bool TBigNet< TNodeData, IsDir >::TEdgeI::operator< ( const TEdgeI EdgeI) const
inline

Definition at line 108 of file bignet.h.

References TBigNet< TNodeData, IsDir >::TEdgeI::CurEdge, and TBigNet< TNodeData, IsDir >::TEdgeI::CurNode.

108 { return CurNode<EdgeI.CurNode || (CurNode==EdgeI.CurNode && CurEdge<EdgeI.CurEdge); }
TNodeI CurNode
Definition: bignet.h:99
template<class TNodeData, bool IsDir>
TEdgeI& TBigNet< TNodeData, IsDir >::TEdgeI::operator= ( const TEdgeI EdgeI)
inline

Definition at line 105 of file bignet.h.

References TBigNet< TNodeData, IsDir >::TEdgeI::CurEdge, TBigNet< TNodeData, IsDir >::TEdgeI::CurNode, and TBigNet< TNodeData, IsDir >::TEdgeI::EndNode.

105 { if (this!=&EdgeI) { CurNode=EdgeI.CurNode; EndNode=EdgeI.EndNode; CurEdge=EdgeI.CurEdge; } return *this; }
TNodeI EndNode
Definition: bignet.h:99
TNodeI CurNode
Definition: bignet.h:99
template<class TNodeData, bool IsDir>
bool TBigNet< TNodeData, IsDir >::TEdgeI::operator== ( const TEdgeI EdgeI) const
inline

Definition at line 109 of file bignet.h.

References TBigNet< TNodeData, IsDir >::TEdgeI::CurEdge, and TBigNet< TNodeData, IsDir >::TEdgeI::CurNode.

109 { return CurNode == EdgeI.CurNode && CurEdge == EdgeI.CurEdge; }
TNodeI CurNode
Definition: bignet.h:99

Friends And Related Function Documentation

template<class TNodeData, bool IsDir>
friend class TNodeNet< TNodeData >
friend

Definition at line 115 of file bignet.h.

Member Data Documentation

template<class TNodeData, bool IsDir>
TNodeI TBigNet< TNodeData, IsDir >::TEdgeI::EndNode
private

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