Package org.anchoranalysis.mpp.pair
Class RandomCollection<T>
- Type Parameters:
T
- The type of items in the collection
- All Implemented Interfaces:
UpdatableMarks
- Direct Known Subclasses:
RandomCollectionWithAddCriteria
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract T
sampleRandomPairNonUniform
(RandomNumberGenerator randomNumberGenerator) Samples a random pair of items from the collection using a non-uniform distribution.Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.anchoranalysis.mpp.mark.UpdatableMarks
add, exchange, initUpdatableMarks, remove
-
Constructor Details
-
RandomCollection
public RandomCollection()
-
-
Method Details
-
sampleRandomPairNonUniform
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
-