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

#include <alg.h>

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 385 of file alg.h.

Member Function Documentation

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

Definition at line 386 of file alg.h.

386  {
387  TIntV EdgeV;
388  // node graph, no explicit edge ids
389  for (typename PGraph::TObj::TEdgeI EI = Graph->BegEI(); EI < Graph->EndEI(); EI++) {
390  if (EI.GetSrcNId() == EI.GetDstNId()) {
391  EdgeV.Add(EI.GetSrcNId());
392  }
393  }
394  for (int i = 0; i < EdgeV.Len(); i++) {
395  Graph->DelEdge(EdgeV[i], EdgeV[i]);
396  }
397  }
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:547
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
Definition: ds.h:574

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