SNAP Library 2.1, Developer 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
TSnap::TSnapDetail::TDelSelfEdges< PGraph, IsMultiGraph > Struct Template Reference

#include <alg.h>

List of all members.

Static Public Member Functions

static void Do (const PGraph &Graph)

Detailed Description

template<class PGraph, bool IsMultiGraph>
struct TSnap::TSnapDetail::TDelSelfEdges< PGraph, IsMultiGraph >

Definition at line 378 of file alg.h.


Member Function Documentation

template<class PGraph, bool IsMultiGraph>
static void TSnap::TSnapDetail::TDelSelfEdges< PGraph, IsMultiGraph >::Do ( const PGraph &  Graph) [inline, static]

Definition at line 379 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]);
    }
  }

Here is the call graph for this function:


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