Class RandomCollection<T>

Object
org.anchoranalysis.bean.AnchorBean<RandomCollection<T>>
org.anchoranalysis.mpp.pair.RandomCollection<T>
Type Parameters:
T - The type of items in the collection
All Implemented Interfaces:
UpdatableMarks

public abstract class RandomCollection<T>
extends AnchorBean<RandomCollection<T>>
implements UpdatableMarks
An abstract collection of items from which one can randomly sample.

This class serves as a base for implementing collections that support non-uniform random sampling of pairs of items.

  • Constructor Details

  • Method Details

    • sampleRandomPairNonUniform

      public abstract T sampleRandomPairNonUniform​(RandomNumberGenerator randomNumberGenerator)
      Samples a random pair of items from the collection using a non-uniform distribution.
      Parameters:
      randomNumberGenerator - The random number generator to use for sampling
      Returns:
      A randomly sampled pair of items