13.0 Adding a pseudorandom number generator

(Linux version)

< 12.0 | 13.0 | 13.1 >

The next step is to create a class that can generate pseudorandom numbers.

A “lot” is an object used to determine games of chance (as in “casting lots”). As we are creating an object used to determine chance events, Lot is an appropriate name for our new class. Lot will be a thin wrapper around the pseudorandom number generators provided by the Boost C++ library. Pseudorandom numbers are essential for computer simulation, including Markov chain Monte Carlo simulation, which is where we are ultimately headed with this tutorial.

Step Title Description
Step 13.1 The Lot Class

Create a class whose objects can generate pseudorandom numbers.

Step 13.2 Test Lot

Take the Lot class for a little spin.

< 12.0 | 13.0 | 13.1 >