Class RandomSampleSet<E>
java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.util.addnegatives.RandomSampleSet<E>
- Type Parameters:
E
- the type of element in the set
A helper class to randomly sample elements from an initial set.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionRandomSampleSet
(Set<E> set) RandomSampleSet
(Set<E> set, long seed) RandomSampleSet
(Set<E> set, Random rand) -
Method Summary
Modifier and TypeMethodDescriptiongetRandomElement
(Set<E> exclude) getRandomElementsWithoutRepetition
(int countOfElements) getRandomElementsWithoutRepetition
(int countOfElements, Set<E> exclude) getRandomElementsWithRepetition
(int countOfElements) getRandomElementsWithRepetition
(int countOfElements, Set<E> exclude)
-
Field Details
-
rand
-
list
To this list no elements are added and it is initialized by a set. Thus we can make sure, that the list contains no two same elements. -
listSize
private double listSize
-
-
Constructor Details
-
RandomSampleSet
-
RandomSampleSet
-
RandomSampleSet
-
-
Method Details
-
getRandomElement
-
getRandomElement
-
getRandomElementsWithRepetition
-
getRandomElementsWithRepetition
-
getRandomElementsWithoutRepetition
-
getRandomElementsWithoutRepetition
-