Changeset 2242:16523135943d in lemon-0.x for demo/descriptor_map_demo.cc
- Timestamp:
- 10/14/06 17:26:05 (18 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2991
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
demo/descriptor_map_demo.cc
r2207 r2242 33 33 #include <lemon/graph_to_eps.h> 34 34 35 #include <lemon/random.h> 36 35 37 #include <iostream> 36 38 37 #include <cstdlib>38 39 #include <cmath> 39 #include <ctime> 40 40 41 41 42 using namespace lemon; … … 76 77 77 78 int main() { 78 std::srand(std::time(0));79 79 typedef ListGraph Graph; 80 80 typedef Graph::Node Node; … … 106 106 const int EDGE = (int)(NODE * std::log(double(NODE))); 107 107 for (int i = 0; i < EDGE; ++i) { 108 int si = (int)(std::rand() / (RAND_MAX + 1.0) * NODE);109 int ti = (int)(std::rand() / (RAND_MAX + 1.0) * NODE);108 int si = rnd[NODE]; 109 int ti = rnd[NODE]; 110 110 111 111 graph.addEdge(nodeInv[si], nodeInv[ti]);
Note: See TracChangeset
for help on using the changeset viewer.