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
TCrossNet::TCrossEdgeI Class Reference

Edge iterator. Only forward iteration (operator++) is supported. More...

#include <mmnet.h>

Public Member Functions

 TCrossEdgeI ()
 
 TCrossEdgeI (const THashIter &CrossHIter, const TCrossNet *GraphPt)
 
 TCrossEdgeI (const TCrossEdgeI &EdgeI)
 
TCrossEdgeIoperator= (const TCrossEdgeI &EdgeI)
 
TCrossEdgeIoperator++ (int)
 Increment iterator. More...
 
bool operator< (const TCrossEdgeI &EdgeI) const
 
bool operator== (const TCrossEdgeI &EdgeI) const
 
int GetId () const
 Returns edge ID. More...
 
int GetSrcNId () const
 Returns the source of the edge. More...
 
int GetDstNId () const
 Returns the destination of the edge. More...
 
int GetSrcModeId () const
 Returns the source mode of the crossnet. More...
 
int GetDstModeId () const
 Returns the destination mode of the crossnet. More...
 
bool IsDirected () const
 Returns whether the edge is directed. More...
 

Private Types

typedef THash< TInt,
TCrossEdge >::TIter 
THashIter
 

Private Attributes

THashIter CrossHI
 
const TCrossNetGraph
 

Friends

class TCrossNet
 

Detailed Description

Edge iterator. Only forward iteration (operator++) is supported.

Definition at line 148 of file mmnet.h.

Member Typedef Documentation

Definition at line 150 of file mmnet.h.

Constructor & Destructor Documentation

TCrossNet::TCrossEdgeI::TCrossEdgeI ( )
inline

Definition at line 154 of file mmnet.h.

154 : CrossHI(), Graph(NULL) { }
THashIter CrossHI
Definition: mmnet.h:151
const TCrossNet * Graph
Definition: mmnet.h:152
TCrossNet::TCrossEdgeI::TCrossEdgeI ( const THashIter CrossHIter,
const TCrossNet GraphPt 
)
inline

Definition at line 155 of file mmnet.h.

155 : CrossHI(CrossHIter), Graph(GraphPt) { }
THashIter CrossHI
Definition: mmnet.h:151
const TCrossNet * Graph
Definition: mmnet.h:152
TCrossNet::TCrossEdgeI::TCrossEdgeI ( const TCrossEdgeI EdgeI)
inline

Definition at line 156 of file mmnet.h.

156 : CrossHI(EdgeI.CrossHI), Graph(EdgeI.Graph) { }
THashIter CrossHI
Definition: mmnet.h:151
const TCrossNet * Graph
Definition: mmnet.h:152

Member Function Documentation

int TCrossNet::TCrossEdgeI::GetDstModeId ( ) const
inline

Returns the destination mode of the crossnet.

Definition at line 172 of file mmnet.h.

172 { return Graph->GetMode2(); }
const TCrossNet * Graph
Definition: mmnet.h:152
int GetMode2() const
Gets the id of the dst mode.
Definition: mmnet.h:324
int TCrossNet::TCrossEdgeI::GetDstNId ( ) const
inline

Returns the destination of the edge.

Definition at line 167 of file mmnet.h.

167 { return CrossHI.GetDat().GetDstNId(); }
THashIter CrossHI
Definition: mmnet.h:151
int TCrossNet::TCrossEdgeI::GetId ( ) const
inline

Returns edge ID.

Definition at line 163 of file mmnet.h.

163 { return CrossHI.GetDat().GetId(); }
THashIter CrossHI
Definition: mmnet.h:151
int TCrossNet::TCrossEdgeI::GetSrcModeId ( ) const
inline

Returns the source mode of the crossnet.

Definition at line 170 of file mmnet.h.

170 { return Graph->GetMode1(); }
const TCrossNet * Graph
Definition: mmnet.h:152
int GetMode1() const
Gets the id of the src mode.
Definition: mmnet.h:322
int TCrossNet::TCrossEdgeI::GetSrcNId ( ) const
inline

Returns the source of the edge.

Definition at line 165 of file mmnet.h.

165 { return CrossHI.GetDat().GetSrcNId(); }
THashIter CrossHI
Definition: mmnet.h:151
bool TCrossNet::TCrossEdgeI::IsDirected ( ) const
inline

Returns whether the edge is directed.

Definition at line 174 of file mmnet.h.

174 { return Graph->IsDirected(); }
const TCrossNet * Graph
Definition: mmnet.h:152
bool IsDirected() const
Whether edges in the crossnet are directed.
Definition: mmnet.h:331
TCrossEdgeI& TCrossNet::TCrossEdgeI::operator++ ( int  )
inline

Increment iterator.

Definition at line 159 of file mmnet.h.

159 { CrossHI++; return *this; }
THashIter CrossHI
Definition: mmnet.h:151
bool TCrossNet::TCrossEdgeI::operator< ( const TCrossEdgeI EdgeI) const
inline

Definition at line 160 of file mmnet.h.

160 { return CrossHI < EdgeI.CrossHI; }
THashIter CrossHI
Definition: mmnet.h:151
TCrossEdgeI& TCrossNet::TCrossEdgeI::operator= ( const TCrossEdgeI EdgeI)
inline

Definition at line 157 of file mmnet.h.

157 { if (this!=&EdgeI) { CrossHI=EdgeI.CrossHI; Graph=EdgeI.Graph; } return *this; }
THashIter CrossHI
Definition: mmnet.h:151
const TCrossNet * Graph
Definition: mmnet.h:152
bool TCrossNet::TCrossEdgeI::operator== ( const TCrossEdgeI EdgeI) const
inline

Definition at line 161 of file mmnet.h.

161 { return CrossHI == EdgeI.CrossHI; }
THashIter CrossHI
Definition: mmnet.h:151

Friends And Related Function Documentation

friend class TCrossNet
friend

Definition at line 177 of file mmnet.h.

Member Data Documentation

THashIter TCrossNet::TCrossEdgeI::CrossHI
private

Definition at line 151 of file mmnet.h.

const TCrossNet* TCrossNet::TCrossEdgeI::Graph
private

Definition at line 152 of file mmnet.h.


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