Changeset 2229:4dbb6dd2dd4b in lemon-0.x for test/test_tools.h
- Timestamp:
- 10/02/06 18:11:00 (18 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2969
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/test_tools.h
r2198 r2229 28 28 #include <lemon/concept_check.h> 29 29 #include <lemon/concept/graph.h> 30 31 #include <lemon/random.h> 30 32 31 33 using namespace lemon; … … 177 179 } 178 180 179 int _urandom_init() {180 int seed = time(0);181 srand(seed);182 return seed;183 }184 185 181 int urandom(int n) { 186 static int seed = _urandom_init(); 187 ignore_unused_variable_warning(seed); 188 return (int)(rand() / (1.0 + RAND_MAX) * n); 182 return rnd.getInt(n); 189 183 } 190 184
Note: See TracChangeset
for help on using the changeset viewer.