SNAP Library 4.1, User Reference  2018-07-26 16:30:42
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, true > Struct Template Reference

#include <alg.h>

Static Public Member Functions

static void Do (const PGraph &Graph)
 

Detailed Description

template<class PGraph>
struct TSnap::TSnapDetail::TDelSelfEdges< PGraph, true >

Definition at line 401 of file alg.h.

Member Function Documentation

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

Definition at line 402 of file alg.h.

402  {
403  TIntV EdgeV;
404  for (typename PGraph::TObj::TEdgeI EI = Graph->BegEI(); EI < Graph->EndEI(); EI++) {
405  if (EI.GetSrcNId() == EI.GetDstNId()) {
406  IAssert(EI.GetId() >= 0); // real edge id
407  EdgeV.Add(EI.GetId());
408  }
409  }
410  for (int i = 0; i < EdgeV.Len(); i++) { // delete all edges between a pair of nodes
411  Graph->DelEdge(EdgeV[i]);
412  }
413  }
#define IAssert(Cond)
Definition: bd.h:262
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

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