Modify

Ticket #9254 (closed Bugs: fixed)

Opened 4 years ago

Last modified 3 years ago

[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).

Attachments

Change History

comment:1 Changed 3 years ago by steven_watanabe

  • Status changed from new to closed
  • Resolution set to fixed
View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.