de.caff.generics.function

## Interface VarFloatOperator

- Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

      @FunctionalInterface
      public interface VarFloatOperator

  Primitive float operator with a variable number of arguments.

  Although this basically works for a variable float array via the `apply(float...)` method implementors have to implement the method `apply(FloatIndexable)` with a `FloatIndexable` argument. This is done to make this class generally more useful without the need to copy arrays.

  Since:
    November 03, 2020
  Author:
    Rammi

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default float` | `apply(float... values)` Apply this operator.
    `float` | `apply(FloatIndexable values)` Apply this operator.
    `static VarFloatOperator` | `fromBinary(FloatOperator2 binaryOp, float startValue)` Create an variable args operator from applying a binary operator over and over.

- - ### Method Detail

    - #### apply

          default float apply(float... values)

      Apply this operator. This default method forwards execution to `apply(FloatIndexable)`.
      Parameters:
        `values` - arguments on which this operator is applied
      Returns:
        result of applying this operator to all arguments

    - #### apply

          float apply(@NotNull
                      FloatIndexable values)

      Apply this operator.
      Parameters:
        `values` - indexable providing the values on which this operator operates
      Returns:
        result of applying this operator to all values

    - #### fromBinary

          @NotNull
          static VarFloatOperator fromBinary(@NotNull
                                                      FloatOperator2 binaryOp,
                                                      float startValue)

      Create an variable args operator from applying a binary operator over and over.

      Eg

           VarFloatOperator maxOp = VarFloatOperator.fromBinary((v1, v2) -> (float)Math.max(v1, v2), Float.NEGATIVE_INFINITY);
           float max = maxOp.apply((1f, -7.1f, (float)Math.PI, 42f);

      On each application the currently accumulated result becomes the left (first) argument of `binaryOp`, while the run value becomes the right (second).
      Parameters:
        `binaryOp` - binary operator
        `startValue` - start value (result of operator if no values are given)
      Returns:
        variable float argument operator which applies the given binary operator over and over