Class MTreeUtils
java.lang.Object
kieker.analysis.generic.clustering.mtree.utils.MTreeUtils
Some utilities.
- Since:
- 2.0.0
- Author:
- Eduardo R. D'Avila
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Comparable<T>>
Pair<T>Identifies the minimum and maximum elements from an iterable, according to the natural ordering of the elements.static <T> List<T>randomSample(Collection<T> collection, int numberOfElements) Randomly chooses elements from the collection.
-
Method Details
-
minMax
Identifies the minimum and maximum elements from an iterable, according to the natural ordering of the elements.- Type Parameters:
T- The type of the elements.- Parameters:
items- AnIterableobject with the elements- Returns:
- A pair with the minimum and maximum elements.
-
randomSample
Randomly chooses elements from the collection.- Type Parameters:
T- The type of the elements.- Parameters:
collection- The collection.numberOfElements- The number of elements to choose.- Returns:
- A list with the chosen elements.
-