SNAP Library 3.0, User Reference  2016-07-20 17:56:49
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>

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.

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.

112 { return CurNode.GetOutNId(CurEdge); }
TNodeI CurNode
Definition: bignet.h:99
int GetOutNId(const int &NodeN) const
Definition: bignet.h:74
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.

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.

111 { return CurNode.GetId(); }
TNodeI CurNode
Definition: bignet.h:99
int GetId() const
Definition: bignet.h:69
template<class TNodeData, bool IsDir>
TEdgeI& TBigNet< TNodeData, IsDir >::TEdgeI::operator++ ( int  )
inline

Definition at line 106 of file bignet.h.

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
template<class TNodeData, bool IsDir>
bool TBigNet< TNodeData, IsDir >::TEdgeI::operator< ( const TEdgeI EdgeI) const
inline

Definition at line 108 of file bignet.h.

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.

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.

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>
int TBigNet< TNodeData, IsDir >::TEdgeI::CurEdge
private

Definition at line 100 of file bignet.h.

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

Definition at line 99 of file bignet.h.

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

Definition at line 99 of file bignet.h.


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