Boost graph libraries: setting edge weight values
Posted
by AndyUK
on Stack Overflow
See other posts from Stack Overflow
or by AndyUK
Published on 2010-04-09T14:48:09Z
Indexed on
2010/04/09
15:03 UTC
Read the original article
Hit count: 375
c++
|boost-graph
I am investigating the use of the boost graph libraries in order to apply them to various network problems I have in mind.
In the examples I have been looking at the graph edge values ("weights") are always initialized as integers, such as in these Bellman-Ford and Kruskal algorithms eg:
int weights[] = { 1, 1, 2, 7, 3, 1, 1, 1 };
My problem is if I try and change the weights to double, I get a heap of warning messages about conversions etc, which so far I have not been able to figure out how to overcome.
Does anyone see a way around this?
© Stack Overflow or respective owner