Table of Contents

RandomizationMode Enum

Definition

Namespace
Bodu.Collections.Generic.Extensions
Assembly
Bodu.Core.dll
Package
Bodu.Core 1.0.1
Source
RandomizationMode.cs

Specifies the available strategies for randomizing a sequence.

public enum RandomizationMode
Extension Methods

Fields

ReservoirSample = 0

Selects a fixed-size random subset using reservoir sampling, without buffering the full sequence.

StreamWindowed = 1

Shuffles elements using a sliding window while streaming, limiting memory use to the window size.

LazyShuffle = 2

Lazily builds a fixed-size reservoir sample and then shuffles and yields its contents.

Remarks

Use RandomizationMode values with Randomize overloads to control how the source sequence is processed and shuffled.

There is no buffer-everything mode: to shuffle a fully materialized collection in place, use the BCL Shuffle<T>(Span<T>) (or Random.Shared.Shuffle) instead.

Applies to

ProductVersions
.NET8, 10