Opened 8 years ago

Last modified 3 years ago

#858 reopened discussion

A proxy class between std random distributions and GSL RNG

Reported by: Peter Owned by: Peter
Priority: major Milestone: yat 0.x+
Component: random Version:
Keywords: Cc:

Description

Boost provides many classes for random number distributions and they are flexible so users can pass their random number generator. I would like to use the singleton in yat::random and to do that I need a proxy class that uses yat::random::RNG and that behaves as a UniformRandomNumberGenerator. yat::random::DiscreteUniform is a candidate with some extensions or we need a new class solely for this purpose.

Change History (11)

comment:1 Changed 4 years ago by Peter

ticket #869 was marked related

comment:2 Changed 4 years ago by Peter

Would be nice if the proxy works against random distribution classes in std <random> (c++11)

comment:3 Changed 4 years ago by Peter

Milestone: yat 0.x+yat 0.18
Owner: changed from Jari Häkkinen to Peter
Status: newaccepted

comment:4 in reply to:  2 Changed 4 years ago by Peter

Replying to Peter:

Would be nice if the proxy works against random distribution classes in std <random> (c++11)

correct url: http://www.cplusplus.com/reference/random/

comment:5 Changed 4 years ago by Peter

In 3897:

refs #869 and #858

comment:6 Changed 4 years ago by Peter

Resolution: fixed
Status: acceptedclosed

In 3898:

closes #858 and #869

comment:7 Changed 3 years ago by Peter

Resolution: fixed
Status: closedreopened

Since we require c++11 now (ticket #949), I suggest we replace this implementation against boost with an implementation against std (before this gets released). Also, means we can get rid of the configure checks for related boost headers with certain distribution as well as merging those tests back to one test file (ticket #944)

comment:8 Changed 3 years ago by Peter

Summary: A proxy class between boost::random and GSL RNGA proxy class between std random distributions and GSL RNG

comment:9 Changed 3 years ago by Peter

Resolution: fixed
Status: reopenedclosed

In 3958:

change to using std distributions instead of boost. Some distributions in boost are not provided in std, but it's easy for a user to use boost distributions as template parameter in random::Distribution and it daughter classes. closes #858.

comment:10 Changed 3 years ago by Peter

In 4008:

Remove Distribution class and its daughter classes. It used
DiscreteUniform? as an Engine with std random distributions but std
requires that an Engine has ::min() and ::max() functions declared
constexpr and the code therefore does not compiler against clang's
implementation of stdlib and it is not possible to implement the
functions constrexpr without significant changes in the RNG class.

refs #858

comment:11 Changed 3 years ago by Peter

Milestone: yat 0.18yat 0.x+
Resolution: fixed
Status: closedreopened
Type: requestdiscussion

Keep this open as an idea.

Note: See TracTickets for help on using tickets.