java.lang.Object
kieker.analysis.generic.clustering.mtree.utils.MTreeUtils

public final class MTreeUtils extends Object
Some utilities.
Since:
2.0.0
Author:
Eduardo R. D'Avila
  • Method Details

    • minMax

      public static <T extends Comparable<T>> Pair<T> minMax(Iterable<T> items)
      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 - An Iterable object with the elements
      Returns:
      A pair with the minimum and maximum elements.
    • randomSample

      public static <T> List<T> randomSample(Collection<T> collection, int numberOfElements)
      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.