| 
    SNAP Library 2.0, Developer Reference
    2013-05-13 16:33:57
    
   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, IsMultiGraph >::Do | ( | const PGraph & | Graph | ) |  [inline, static] | 
        
Definition at line 363 of file alg.h.
References TVec< TVal, TSizeTy >::Add(), and TVec< TVal, TSizeTy >::Len().
                                      {
    TIntV EdgeV;
    // node graph, no explicit edge ids
    for (typename PGraph::TObj::TEdgeI EI = Graph->BegEI(); EI < Graph->EndEI(); EI++) {
      if (EI.GetSrcNId() == EI.GetDstNId()) {
        EdgeV.Add(EI.GetSrcNId());
      }
    }
    for (int i = 0; i < EdgeV.Len(); i++) {
      Graph->DelEdge(EdgeV[i], EdgeV[i]);
    }
  }
