Random module
#include "diplib/random.h"
dip::BinaryRandomGenerator class

Generates random binary values.

The operator() method returns the next random value in the sequence. It takes one parameter, the probability of drawing true.

The constructor takes and stores a reference to a dip::Random object, which is used to produce the randomness. That object needs to exist for as long as this one exists.

Constructors, destructors, assignment and conversion operators

BinaryRandomGenerator(dip::Random& generator) explicit
Constructor

Operators

auto operator()(dip::dfloat p) -> dip::bin
Get the next random value, using the given parameter.