Package org.anchoranalysis.mpp.pair
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 Summary
Constructors Constructor Description RandomCollection() -
Method Summary
Modifier and Type Method Description abstract TsampleRandomPairNonUniform(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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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
-