Skip to content

WeightedChoice could use the Walker or Vose Alias method for O(1) sampling (instead of O(log n)) #601

@huonw

Description

@huonw

https://en.wikipedia.org/wiki/Alias_method allows for O(1) sampling of variates with still only O(n) of preprocessing, which is significantly better than the O(log n) of the current method (binary search, sometimes called Roulette Wheel Selection).

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