
I am writing a simple graph app. The edges have an unsigned integer property
that is incremented every time I "add" an edge from one given node to
another, thus, any given edge has an "instance" of at least one, but if
there are, say, three edges from node A to node B, edge A->B has nInstances
== 3.
To do this I would like to attempt to add an edge between nodes, and if the
edge has already been added, just bump the counter for that edge, otherwise,
set the counter to 1. My basic approach is to call tie(edge_iter, boolflag)
= add_edge(v0, v1, graph). If boolvar is set to false then the edge already
was in the graph.
The problem is that add_edge() never clears boolvar - it is always true,
even when I coerce redundant edges, as in the following code:
#include "stdafx.h"
#include