I made a super simple example: A graph with 2 nodes and an edge between
them. On trying to call kolmogorov_max_flow, I am getting:
error: cannot convert 'boost::detail::error_property_not_found' to 'long
int' in initialization
Can anyone see what I am doing wrong?
#include <iostream> // for std::cout
#include <utility> // for std::pair
#include <algorithm> // for std::for_each
#include
const int num_nodes = 5; E edges[] = { E(0,2), E(1,1), E(1,3), E(1,4), E(2,1), E(2,3), E(3,4), E(4,0), E(4,1) }; int weights[] = { 1, 2, 1, 2, 7, 3, 1, 1, 1};
Graph G(edges + sizeof(edges) / sizeof(E), weights, num_nodes);
but if I want to add edges like this: for (int i = 0; i < 1; ++i)
{ add_edge(0, 1, g); //add an edge between node 0 and node 1 }
How would I specify the edge weights? Thanks! David