SNAP Library 2.2, Developer Reference
2014-03-11 19:15:55
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
Edge iterator. Only forward iteration (operator++) is supported. More...
#include <network.h>
Public Member Functions | |
TEdgeI () | |
TEdgeI (const TNodeI &NodeI, const TNodeI &EndNodeI, const int &EdgeN=0) | |
TEdgeI (const TEdgeI &EdgeI) | |
TEdgeI & | operator= (const TEdgeI &EdgeI) |
TEdgeI & | operator++ (int) |
Increment iterator. | |
bool | operator< (const TEdgeI &EdgeI) const |
bool | operator== (const TEdgeI &EdgeI) const |
int | GetId () const |
Gets edge ID. Always returns -1 since only edges in multigraphs have explicit IDs. | |
int | GetSrcNId () const |
Gets the source node of an edge. | |
int | GetDstNId () const |
Gets the destination node of an edge. | |
TEdgeData & | operator() () |
const TEdgeData & | operator() () const |
TEdgeData & | GetDat () |
const TEdgeData & | GetDat () const |
TNodeData & | GetSrcNDat () |
const TNodeData & | GetSrcNDat () const |
TNodeData & | GetDstNDat () |
const TNodeData & | GetDstNDat () const |
Private Attributes | |
TNodeI | CurNode |
TNodeI | EndNode |
int | CurEdge |
Friends | |
class | TNodeEDatNet< TNodeData, TEdgeData > |
Edge iterator. Only forward iteration (operator++) is supported.
TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::TEdgeI | ( | ) | [inline] |
TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::TEdgeI | ( | const TNodeI & | NodeI, |
const TNodeI & | EndNodeI, | ||
const int & | EdgeN = 0 |
||
) | [inline] |
TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::TEdgeI | ( | const TEdgeI & | EdgeI | ) | [inline] |
TEdgeData& TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::GetDat | ( | ) | [inline] |
Definition at line 566 of file network.h.
References TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::CurEdge, TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::CurNode, and TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetOutEDat().
{ return CurNode.GetOutEDat(CurEdge); }
const TEdgeData& TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::GetDat | ( | ) | const [inline] |
Definition at line 567 of file network.h.
References TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::CurEdge, TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::CurNode, and TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetOutEDat().
{ return CurNode.GetOutEDat(CurEdge); }
TNodeData& TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::GetDstNDat | ( | ) | [inline] |
Definition at line 570 of file network.h.
References TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::CurEdge, TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::CurNode, and TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetOutNDat().
{ return CurNode.GetOutNDat(CurEdge); }
const TNodeData& TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::GetDstNDat | ( | ) | const [inline] |
Definition at line 571 of file network.h.
References TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::CurEdge, TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::CurNode, and TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetOutNDat().
{ return CurNode.GetOutNDat(CurEdge); }
int TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::GetDstNId | ( | ) | const [inline] |
Gets the destination node of an edge.
Definition at line 563 of file network.h.
References TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::CurEdge, TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::CurNode, and TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetOutNId().
int TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::GetId | ( | ) | const [inline] |
TNodeData& TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::GetSrcNDat | ( | ) | [inline] |
Definition at line 568 of file network.h.
References TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::CurNode.
{ return CurNode(); }
const TNodeData& TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::GetSrcNDat | ( | ) | const [inline] |
Definition at line 569 of file network.h.
References TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::CurNode.
{ return CurNode(); }
int TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::GetSrcNId | ( | ) | const [inline] |
Gets the source node of an edge.
Definition at line 561 of file network.h.
References TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::CurNode, and TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetId().
TEdgeData& TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::operator() | ( | ) | [inline] |
Definition at line 564 of file network.h.
References TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::CurEdge, TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::CurNode, and TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetOutEDat().
{ return CurNode.GetOutEDat(CurEdge); }
const TEdgeData& TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::operator() | ( | ) | const [inline] |
Definition at line 565 of file network.h.
References TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::CurEdge, TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::CurNode, and TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetOutEDat().
{ return CurNode.GetOutEDat(CurEdge); }
TEdgeI& TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::operator++ | ( | int | ) | [inline] |
Increment iterator.
Definition at line 554 of file network.h.
References TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::CurEdge, TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::CurNode, TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::EndNode, and TNodeEDatNet< TNodeData, TEdgeData >::TNodeI::GetOutDeg().
{ CurEdge++; if (CurEdge >= CurNode.GetOutDeg()) { CurEdge=0; CurNode++; while (CurNode < EndNode && CurNode.GetOutDeg()==0) { CurNode++; } } return *this; }
bool TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::operator< | ( | const TEdgeI & | EdgeI | ) | const [inline] |
Definition at line 556 of file network.h.
References TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::CurEdge, and TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::CurNode.
TEdgeI& TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::operator= | ( | const TEdgeI & | EdgeI | ) | [inline] |
Definition at line 552 of file network.h.
References TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::CurEdge, TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::CurNode, and TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::EndNode.
bool TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::operator== | ( | const TEdgeI & | EdgeI | ) | const [inline] |
Definition at line 557 of file network.h.
References TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::CurEdge, and TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::CurNode.
friend class TNodeEDatNet< TNodeData, TEdgeData > [friend] |
int TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::CurEdge [private] |
Definition at line 547 of file network.h.
Referenced by TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::GetDat(), TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::GetDstNDat(), TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::GetDstNId(), TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::operator()(), TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::operator++(), TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::operator<(), TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::operator=(), and TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::operator==().
TNodeI TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::CurNode [private] |
Definition at line 546 of file network.h.
Referenced by TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::GetDat(), TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::GetDstNDat(), TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::GetDstNId(), TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::GetSrcNDat(), TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::GetSrcNId(), TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::operator()(), TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::operator++(), TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::operator<(), TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::operator=(), and TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::operator==().
TNodeI TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::EndNode [private] |
Definition at line 546 of file network.h.
Referenced by TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::operator++(), and TNodeEDatNet< TNodeData, TEdgeData >::TEdgeI::operator=().