mirror of
https://github.com/triqs/dft_tools
synced 2024-12-25 22:03:43 +01:00
rng : preview
This commit is contained in:
parent
22ef7ac015
commit
edca014785
@ -33,6 +33,12 @@ namespace boost{
|
|||||||
buf->fill();
|
buf->fill();
|
||||||
return *cur++;
|
return *cur++;
|
||||||
}
|
}
|
||||||
|
inline R const preview() {
|
||||||
|
if (cur == end)
|
||||||
|
buf->fill();
|
||||||
|
return *cur;
|
||||||
|
}
|
||||||
|
|
||||||
generator(generator<R> const & rhs)
|
generator(generator<R> const & rhs)
|
||||||
:
|
:
|
||||||
buf(new buffer (*rhs.buf))
|
buf(new buffer (*rhs.buf))
|
||||||
|
@ -59,6 +59,9 @@ namespace mc_tools {
|
|||||||
INTEGER_OVERLOAD(size_t)
|
INTEGER_OVERLOAD(size_t)
|
||||||
#undef INTEGER_OVERLOAD
|
#undef INTEGER_OVERLOAD
|
||||||
|
|
||||||
|
/// Returns a double in [0,1[ with flat distribution
|
||||||
|
double preview() { return gen->preview();}
|
||||||
|
|
||||||
/// Returns a double in [0,1[ with flat distribution
|
/// Returns a double in [0,1[ with flat distribution
|
||||||
double operator()() { return ((*gen)());}
|
double operator()() { return ((*gen)());}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user