Interface IntGenerator

  • All Known Implementing Classes:
    CombinedIntGenerator, ExponentialIntGenerator, LinearIntGenerator, StaticIntGenerator

    public interface IntGenerator
    Generators of integer ranges.

    This is similar in spirit to the Java IntStream, but it allows the stream to be processed multiple times, and allows accessing the minimum and maximum. This is necessary to, e.g., precompute nearest neighbors for the maximum k employed and similar.

    Duplicates values are not automatically removed, and the values are not necessarily ordered.

    TODO: fully support the Java 8 IntStream API, in particular spliterators for parallel processing.

    Since:
    0.7.5
    Author:
    Erich Schubert
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void forEach​(java.util.function.IntConsumer c)
      Process the entire series once.
      int getMax()
      Maximum value of the stream.
      int getMin()
      Minimum value of the stream.
      java.lang.StringBuilder serializeTo​(java.lang.StringBuilder buf)
      Produce a textual representation.
    • Method Detail

      • getMin

        int getMin()
        Minimum value of the stream.
        Returns:
        Minimum
      • getMax

        int getMax()
        Maximum value of the stream.
        Returns:
        Maximum
      • forEach

        void forEach​(java.util.function.IntConsumer c)
        Process the entire series once.
        Parameters:
        c - Consumer
      • serializeTo

        java.lang.StringBuilder serializeTo​(java.lang.StringBuilder buf)
        Produce a textual representation.
        Parameters:
        buf - Output buffer.
        Returns:
        Buffer