1.1 --- a/demo/descriptor_map_demo.cc Fri Oct 13 15:10:50 2006 +0000
1.2 +++ b/demo/descriptor_map_demo.cc Sat Oct 14 15:26:05 2006 +0000
1.3 @@ -32,11 +32,12 @@
1.4 #include <lemon/dim2.h>
1.5 #include <lemon/graph_to_eps.h>
1.6
1.7 +#include <lemon/random.h>
1.8 +
1.9 #include <iostream>
1.10
1.11 -#include <cstdlib>
1.12 #include <cmath>
1.13 -#include <ctime>
1.14 +
1.15
1.16 using namespace lemon;
1.17
1.18 @@ -75,7 +76,6 @@
1.19 };
1.20
1.21 int main() {
1.22 - std::srand(std::time(0));
1.23 typedef ListGraph Graph;
1.24 typedef Graph::Node Node;
1.25 typedef Graph::Edge Edge;
1.26 @@ -105,8 +105,8 @@
1.27 // it holds reference to it.
1.28 const int EDGE = (int)(NODE * std::log(double(NODE)));
1.29 for (int i = 0; i < EDGE; ++i) {
1.30 - int si = (int)(std::rand() / (RAND_MAX + 1.0) * NODE);
1.31 - int ti = (int)(std::rand() / (RAND_MAX + 1.0) * NODE);
1.32 + int si = rnd[NODE];
1.33 + int ti = rnd[NODE];
1.34
1.35 graph.addEdge(nodeInv[si], nodeInv[ti]);
1.36 }