Esempio n. 1
0
fcppt::random::uniform<T, Generator>::uniform(
	range_type const &_range,
	Generator _gen
)
:
	variate_(
		_gen,
		distribution(
			_range.first(),
			_range.last()
		)
	)
{}
Esempio n. 2
0
fcppt::random::uniform<T, Generator>::uniform(
	range_type const &_range
)
:
	variate_(
		typename boost::remove_reference<Generator>::type(
			static_cast<
				typename boost::remove_reference<Generator>::type::result_type
			>(
				fcppt::chrono::high_resolution_clock::now().time_since_epoch().count()
			)
		),
		distribution(
			_range.first(),
			_range.last()
		)
	)
{}