# rand::distributions::weighted - Rust
Weighted index sampling
Keywords: rust, rustlang, rust-lang, weighted

# Module rand::distributions::weighted

source · [−]
👎 Deprecated since 0.8.0:

use rand::distributions::{WeightedIndex, WeightedError} instead

Expand description

Weighted index sampling

This module is deprecated. Use `crate::distributions::WeightedIndex` and `crate::distributions::WeightedError` instead.

## Modules

alias_method Deprecated

## Structs

WeightedIndex

A distribution using weighted sampling of discrete items

## Enums

WeightedError

Error type returned from `WeightedIndex::new`.