SNAP Library 2.1, User Reference  2013-09-25 10:47:25
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TBigNet< TNodeData, IsDir >::TEdgeI Class Reference

Edge iterator. More...

#include <bignet.h>

List of all members.

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.

: CurNode(), EndNode(), CurEdge(0) { }
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.

: CurNode(NodeI), EndNode(EndNodeI), CurEdge(0) { }
template<class TNodeData, bool IsDir>
TBigNet< TNodeData, IsDir >::TEdgeI::TEdgeI ( const TEdgeI EdgeI) [inline]

Definition at line 104 of file bignet.h.

: CurNode(EdgeI.CurNode), EndNode(EdgeI.EndNode), CurEdge(EdgeI.CurEdge) { }

Member Function Documentation

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

Definition at line 114 of file bignet.h.

{ return CurNode.GetOutNDat(CurEdge); }
template<class TNodeData, bool IsDir>
int TBigNet< TNodeData, IsDir >::TEdgeI::GetDstNId ( ) const [inline]

Definition at line 112 of file bignet.h.

{ return CurNode.GetOutNId(CurEdge); }
template<class TNodeData, bool IsDir>
int TBigNet< TNodeData, IsDir >::TEdgeI::GetId ( ) const [inline]

Definition at line 110 of file bignet.h.

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

Definition at line 113 of file bignet.h.

{ return CurNode.GetNDat(); }
template<class TNodeData, bool IsDir>
int TBigNet< TNodeData, IsDir >::TEdgeI::GetSrcNId ( ) const [inline]

Definition at line 111 of file bignet.h.

{ return CurNode.GetId(); }
template<class TNodeData, bool IsDir>
TEdgeI& TBigNet< TNodeData, IsDir >::TEdgeI::operator++ ( int  ) [inline]

Definition at line 106 of file bignet.h.

                             { CurEdge++; if (CurEdge >= CurNode.GetOutDeg()) { CurEdge=0;  CurNode++;
      while (CurNode < EndNode && CurNode.GetOutDeg()==0) { CurNode++; } }  return *this; }
template<class TNodeData, bool IsDir>
bool TBigNet< TNodeData, IsDir >::TEdgeI::operator< ( const TEdgeI EdgeI) const [inline]

Definition at line 108 of file bignet.h.

{ return CurNode<EdgeI.CurNode || (CurNode==EdgeI.CurNode && CurEdge<EdgeI.CurEdge); }
template<class TNodeData, bool IsDir>
TEdgeI& TBigNet< TNodeData, IsDir >::TEdgeI::operator= ( const TEdgeI EdgeI) [inline]

Definition at line 105 of file bignet.h.

{ if (this!=&EdgeI) { CurNode=EdgeI.CurNode;  EndNode=EdgeI.EndNode;  CurEdge=EdgeI.CurEdge; }  return *this; }
template<class TNodeData, bool IsDir>
bool TBigNet< TNodeData, IsDir >::TEdgeI::operator== ( const TEdgeI EdgeI) const [inline]

Definition at line 109 of file bignet.h.

{ return CurNode == EdgeI.CurNode && CurEdge == EdgeI.CurEdge; }

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: