Class Randomize


  • public class Randomize
    extends Object
    For randomizing bins/binnable lists.
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    • Constructor Detail

      • Randomize

        public Randomize()
    • Method Detail

      • randomizeData

        public static <T> List<Binnable<T>> randomizeData​(List<Binnable<T>> data,
                                                          long seed)
        Randomizes the binnable data in-place.
        Type Parameters:
        T - the type of payload
        Parameters:
        data - the data to randomize
        seed - the seed to use
        Returns:
        returns randomized input
      • randomizeData

        public static <T> List<Binnable<T>> randomizeData​(List<Binnable<T>> data,
                                                          Random random)
        Randomizes the binnable data in-place.
        Type Parameters:
        T - the type of payload
        Parameters:
        data - the data to randomize
        random - the random number generator to use
        Returns:
        returns randomized input
      • randomizeBins

        public static <T> List<Bin<T>> randomizeBins​(List<Bin<T>> bins,
                                                     long seed)
        Randomizes the data in the bins in-place.
        Type Parameters:
        T - the type of payload
        Parameters:
        bins - the bins to randomize
        seed - the seed to use
        Returns:
        returns randomized input
      • randomizeBins

        public static <T> List<Bin<T>> randomizeBins​(List<Bin<T>> bins,
                                                     Random random)
        Randomizes the data in the bins in-place.
        Type Parameters:
        T - the type of payload
        Parameters:
        bins - the bins to randomize
        random - the random number generator to use
        Returns:
        returns randomized input