title: Boost graph libraries: setting edge weight values
body: <p>I am investigating the use of the boost graph libraries in order to apply them to various network problems I have in mind.</p>
  
  <p>In the examples I have been looking at the graph edge values ("weights") are always initialized as integers, such as in these <a href="http://www.boost.org/doc/libs/1_42_0/libs/graph/example/bellman-example.cpp" rel="nofollow noreferrer">Bellman-Ford</a> and <a href="http://www.boost.org/doc/libs/1_42_0/libs/graph/example/kruskal-example.cpp" rel="nofollow noreferrer">Kruskal</a> algorithms eg:</p>
  
  <pre><code>int weights[] = { 1, 1, 2, 7, 3, 1, 1, 1 };
  </code></pre>
  
  <p>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.</p>
  
  <p>Does anyone see a way around this?</p>