2
0
mirror of https://github.com/boostorg/graph.git synced 2026-01-19 04:12:11 +00:00

Include ctime and use std::time function.

This commit is contained in:
Edward Diener
2020-04-03 12:11:43 -04:00
parent 14c2bf17b4
commit 7f77c3563b
5 changed files with 9 additions and 5 deletions

View File

@@ -10,6 +10,7 @@
#include <iostream>
#include <map>
#include <vector>
#include <ctime>
#include <boost/config.hpp>
#ifdef BOOST_MSVC
@@ -80,7 +81,7 @@ int main(int argc, char* argv[])
int vertices_to_create = 10;
int edges_to_create = 500;
std::size_t random_seed = time(0);
std::size_t random_seed = std::time(0);
if (argc > 1)
{

View File

@@ -10,6 +10,7 @@
#include <fstream>
#include <iostream>
#include <set>
#include <ctime>
#include <boost/foreach.hpp>
#include <boost/lexical_cast.hpp>
@@ -224,7 +225,7 @@ template < unsigned int Dims > void do_test(minstd_rand& generator)
int main(int argc, char* argv[])
{
std::size_t random_seed = time(0);
std::size_t random_seed = std::time(0);
if (argc > 1)
{

View File

@@ -10,6 +10,7 @@
#include <iostream>
#include <map>
#include <set>
#include <ctime>
#include <boost/foreach.hpp>
#include <boost/graph/adjacency_list.hpp>
@@ -127,7 +128,7 @@ template < typename Graph > void test_graph(const Graph& graph)
int main(int argc, char* argv[])
{
std::size_t vertices_to_generate = 100, edges_to_generate = 50,
random_seed = time(0);
random_seed = std::time(0);
// Parse command-line arguments

View File

@@ -12,6 +12,7 @@
#include <fstream>
#include <sstream>
#include <vector>
#include <ctime>
#include <boost/lexical_cast.hpp>
#include <boost/random.hpp>
@@ -311,7 +312,7 @@ int main(int argc, char* argv[])
{
int vertices_to_create = 10;
int max_edges_per_vertex = 2;
std::size_t random_seed = time(0);
std::size_t random_seed = std::time(0);
if (argc > 1)
{

View File

@@ -90,7 +90,7 @@ void testScalability(unsigned numpts)
typedef set< simple_point< double >, cmpPnt< double > > PointSet;
typedef vector< Vertex > Container;
boost::mt19937 rng(time(0));
boost::mt19937 rng(std::time(0));
uniform_real<> range(0.01, (numpts * 2));
variate_generator< boost::mt19937&, uniform_real<> > pnt_gen(rng, range);