Opened 9 years ago

Closed 9 years ago

#9254 closed Bugs (fixed)

[random] mistake documentation : kreutzer1986 size

Reported by: Akira Takahashi <faithandbrave@…> Owned by: No-Maintainer
Milestone: To Be Determined Component: random
Version: Boost 1.54.0 Severity: Problem
Keywords: Cc:

Description

http://www.boost.org/doc/libs/1_54_0/doc/html/boost_random/reference.html#boost_random.reference.generators

This page says:

generator |  approx. memory requirements
kreutzer1986 | 1368*sizeof(uint32_t)

I checked this requirements.

#include <iostream>
#include <boost/random/shuffle_order.hpp>

int main()
{
    typedef boost::random::kreutzer1986 dist_type;

    std::size_t size = sizeof(dist_type) / sizeof(dist_type::result_type);
    std::cout << size << std::endl; // 99
}
// <boost/random/shuffle_order.hpp>
typedef shuffle_order_engine<
    linear_congruential_engine<uint32_t, 1366, 150889, 714025>,
    97> kreutzer1986;

// shuffle_order table size 97 + linear_congruential_engine

If I understand correctly, kreutzer1986 size shoule be 98*sizeof(uint32_t).

Change History (1)

comment:1 by Steven Watanabe, 9 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.