# Package org.apache.datasketches.sampling

package org.apache.datasketches.sampling
This package is dedicated to streaming algorithms that enable fixed size, uniform sampling of weighted and unweighted items from a stream.

These sketches are mergeable and can be serialized and deserialized to/from a compact form.

See Also:
  - `ReservoirItemsSketch`
  - `ReservoirLongsSketch`
  - `VarOptItemsSketch`

Related Packages
Package
Description
org.apache.datasketches
This package is the parent package for all sketch families and common code areas.
Classes
Class
Description
EbppsItemsSketch<T>
An implementation of an Exact and Bounded Sampling Proportional to Size sketch.
ReservoirItemsSketch<T>
This sketch provides a reservoir sample over an input stream of items.
ReservoirItemsUnion<T>
Class to union reservoir samples of generic items.
ReservoirLongsSketch
This sketch provides a reservoir sample over an input stream of `long`s.
ReservoirLongsUnion
Class to union reservoir samples of longs.
SampleSubsetSummary
A simple object o capture the results of a subset sum query on a sampling sketch.
VarOptItemsSamples<T>
This class provides access to the samples contained in a VarOptItemsSketch.
VarOptItemsSketch<T>
This sketch provides a variance optimal sample over an input stream of weighted items.
VarOptItemsUnion<T>
Provides a unioning operation over varopt sketches.