SNAP Library 6.0, Developer Reference  2020-12-09 16:24:20
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
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.

References TVec< TVal, TSizeTy >::Add(), and TVec< TVal, TSizeTy >::Len().

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:575
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
Definition: ds.h:602

Here is the call graph for this function:


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