Skip to content

Add ability to randomly generate integers from discrete uniform #2457

Description

@lcomm

Summary:

For contexts like bootstrapping, it would be helpful to be able to sample uniformly from the set of integers 1, ..., N. Because the ceil() function does not return an integer, we cannot do ceil(uniform_rng(0, N)).

Description:

The ideal function would take inputs of minInteger and maxInteger. The return type would be an integer between minInteger and maxInteger, inclusive. All possible return values would arise with the same probability.

Reproducible Steps:

N/A

Current Output:

N/A

Expected Output:

N/A

Additional Information:

N/A

Current Version:

v2.17.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions