SNAP Library , Developer Reference
2013-01-07 14:03:36
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <alg.h>
Static Public Member Functions | |
static void | Do (const PGraph &Graph) |
static void TSnap::TSnapDetail::TDelSelfEdges< PGraph, true >::Do | ( | const PGraph & | Graph | ) | [inline, static] |
Definition at line 379 of file alg.h.
References TVec< TVal >::Add(), IAssert, and TVec< TVal >::Len().
{ TIntV EdgeV; for (typename PGraph::TObj::TEdgeI EI = Graph->BegEI(); EI < Graph->EndEI(); EI++) { if (EI.GetSrcNId() == EI.GetDstNId()) { IAssert(EI.GetId() >= 0); // real edge id EdgeV.Add(EI.GetId()); } } for (int i = 0; i < EdgeV.Len(); i++) { // delete all edges between a pair of nodes Graph->DelEdge(EdgeV[i]); } }