Skip to content

WeightedIndex distribution naming #763

@dhardy

Description

@dhardy

As noted in the original PR and here, we're not entirely happy with the path/name of weighted index distributions:

use rand::distributions::weighted::WeightedIndex;
// or:
use rand::distributions::weighted::alias_method::WeightedIndex;

These paths are long, slightly repetitive ("weighted"), and one of the paths includes the algorithm name which we usually avoid. Also, Index is potentially unnecessary (this is designed for indexing weighted arrays, but is essentially just a biased finite integer distribution).

This needs review before 0.7.

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-help-wantedParticipation: help wanted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions