Hi everybody,<br><br>It seems like there have been a lot of changes from 4.3 to 5. Thanks for the efforts.<br>The code I had in 4.3 does not work anymore with 5, it is of course migratable but now the main concern is regarding the suffleing algorithm of STL.<br>
The results in windows and using MSVC (MSVS2010)compiler is not what one expects. This is for example the case for qap example. <br>I personally cannot run it. It reports exception and exits.<br><br>One only needs to trace the code until:<br>
 template&lt;typename random_generator&gt;<br>  void random_shuffle(permutation_problem&amp; p, random_generator&amp; rng)<br>  {<br>#if defined (METSLIB_HAVE_UNORDERED_MAP) &amp;&amp; !defined (METSLIB_TR1_MIXED_NAMESPACE)<br>
    std::uniform_int&lt;&gt; unigen(0, p.pi_m.size());<br>    std::variate_generator&lt;random_generator, <br>      std::uniform_int&lt;&gt; &gt;gen(rng, unigen);<br>#else<br>    std::tr1::uniform_int&lt;&gt; unigen(0, p.pi_m.size());<br>
    std::tr1::variate_generator&lt;random_generator, <br>      std::tr1::uniform_int&lt;&gt; &gt;gen(rng, unigen);<br>#endif<br>    std::random_shuffle(p.pi_m.begin(), p.pi_m.end(), gen);<br>    p.update_cost();<br>  }<br>
<br><br>The output of this &quot;std::random_shuffle(p.pi_m.begin(), p.pi_m.end(), gen);&quot; is the original permutation where some of the cells are swapped BUT there are some strange numbers among the numbers. large positive values specifically. I searched a lot with no success about how to overcome.<br>
<br>I was wondering if anyone has any idea?<br><br>