Returns a random variate R in range [min, max]such that floor(log(R‐min, base)) is uniformly distributed.

Synopsis

Declared in <absl/random/log_uniform_int_distribution.h>

template<typename IntType = int>
class log_uniform_int_distribution;

Description

We ensure uniformity by discretization using the boundary sets [0, 1, base, base * base, ... min(base].

Types

Name

Description

param_type

The parameter set of the distribution.

Type Aliases

Name

Description

result_type

The type of the values produced by the distribution.

Member Functions

Name

Description

log_uniform_int_distribution [constructor]

Constructors

base

Returns the base of the logarithm.

max

Returns the largest value the distribution can produce.

min

Returns the smallest value the distribution can produce.

operator()

Function call operators

param

param overloads

reset

Resets the internal state of the distribution.

Friends

Name

Description

absl::operator!=

Compares two distributions for inequality.

absl::operator==

Compares two distributions for equality.

Created with MrDocs