Package extra166y

Class ParallelLongArrayWithDoubleMapping

java.lang.Object
extra166y.AbstractParallelAnyArray
extra166y.ParallelLongArrayWithDoubleMapping

public abstract class ParallelLongArrayWithDoubleMapping extends AbstractParallelAnyArray
A prefix view of ParallelLongArray that causes operations to apply to mappings of elements, not to the elements themselves. Instances of this class may be constructed only via prefix methods of ParallelLongArray or its other prefix classes.
  • Method Details

    • apply

      public void apply(Ops.DoubleProcedure procedure)
      Applies the given procedure
      Parameters:
      procedure - the procedure
    • reduce

      public double reduce(Ops.DoubleReducer reducer, double base)
      Returns reduction of mapped elements
      Parameters:
      reducer - the reducer
      base - the result for an empty array
      Returns:
      reduction
    • min

      public double min()
      Returns the minimum element, or Double.MAX_VALUE if empty
      Returns:
      minimum element, or Double.MAX_VALUE if empty
    • min

      public double min(Ops.DoubleComparator comparator)
      Returns the minimum element, or Double.MAX_VALUE if empty
      Parameters:
      comparator - the comparator
      Returns:
      minimum element, or Double.MAX_VALUE if empty
    • max

      public double max()
      Returns the maximum element, or -Double.MAX_VALUE if empty
      Returns:
      maximum element, or -Double.MAX_VALUE if empty
    • max

      public double max(Ops.DoubleComparator comparator)
      Returns the maximum element, or -Double.MAX_VALUE if empty
      Parameters:
      comparator - the comparator
      Returns:
      maximum element, or -Double.MAX_VALUE if empty
    • sum

      public double sum()
      Returns the sum of elements
      Returns:
      the sum of elements
    • summary

      Returns summary statistics
      Parameters:
      comparator - the comparator to use for locating minimum and maximum elements
      Returns:
      the summary.
    • summary

      Returns summary statistics, using natural comparator
      Returns:
      the summary.
    • all

      public ParallelDoubleArray all()
      Returns a new ParallelDoubleArray holding mappings
      Returns:
      a new ParallelDoubleArray holding mappings
    • withMapping

      public abstract ParallelLongArrayWithLongMapping withMapping(Ops.DoubleToLong op)
      Returns an operation prefix that causes a method to operate on mapped elements of the array using the given op.
      Parameters:
      op - the op
      Returns:
      operation prefix
    • withMapping

      public abstract ParallelLongArrayWithDoubleMapping withMapping(Ops.DoubleOp op)
      Returns an operation prefix that causes a method to operate on mapped elements of the array using the given op.
      Parameters:
      op - the op
      Returns:
      operation prefix
    • withMapping

      public abstract <U> ParallelLongArrayWithMapping<U> withMapping(Ops.DoubleToObject<? extends U> op)
      Returns an operation prefix that causes a method to operate on mapped elements of the array using the given op.
      Parameters:
      op - the op
      Returns:
      operation prefix
    • withMapping

      public <V, W, X> ParallelLongArrayWithMapping<W> withMapping(Ops.DoubleAndObjectToObject<? super V,? extends W> combiner, ParallelArrayWithMapping<X,V> other)
      Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.
      Parameters:
      combiner - the combiner
      other - the other array
      Returns:
      operation prefix
      Throws:
      IllegalArgumentException - if other array is a filtered view (all filters must precede all mappings).
    • withMapping

      public <V> ParallelLongArrayWithMapping<V> withMapping(Ops.DoubleAndDoubleToObject<? extends V> combiner, ParallelDoubleArrayWithDoubleMapping other)
      Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.
      Parameters:
      combiner - the combiner
      other - the other array
      Returns:
      operation prefix
      Throws:
      IllegalArgumentException - if other array is a filtered view (all filters must precede all mappings).
    • withMapping

      public <V> ParallelLongArrayWithMapping<V> withMapping(Ops.DoubleAndLongToObject<? extends V> combiner, ParallelLongArrayWithLongMapping other)
      Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.
      Parameters:
      combiner - the combiner
      other - the other array
      Returns:
      operation prefix
      Throws:
      IllegalArgumentException - if other array is a filtered view (all filters must precede all mappings).
    • withMapping

      public <V, W> ParallelLongArrayWithDoubleMapping withMapping(Ops.DoubleAndObjectToDouble<? super V> combiner, ParallelArrayWithMapping<W,V> other)
      Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.
      Parameters:
      combiner - the combiner
      other - the other array
      Returns:
      operation prefix
      Throws:
      IllegalArgumentException - if other array is a filtered view (all filters must precede all mappings).
    • withMapping

      Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.
      Parameters:
      combiner - the combiner
      other - the other array
      Returns:
      operation prefix
      Throws:
      IllegalArgumentException - if other array is a filtered view (all filters must precede all mappings).
    • withMapping

      Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.
      Parameters:
      combiner - the combiner
      other - the other array
      Returns:
      operation prefix
      Throws:
      IllegalArgumentException - if other array is a filtered view (all filters must precede all mappings).
    • withMapping

      public <V, W> ParallelLongArrayWithLongMapping withMapping(Ops.DoubleAndObjectToLong<? super V> combiner, ParallelArrayWithMapping<W,V> other)
      Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.
      Parameters:
      combiner - the combiner
      other - the other array
      Returns:
      operation prefix
      Throws:
      IllegalArgumentException - if other array is a filtered view (all filters must precede all mappings).
    • withMapping

      Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.
      Parameters:
      combiner - the combiner
      other - the other array
      Returns:
      operation prefix
      Throws:
      IllegalArgumentException - if other array is a filtered view (all filters must precede all mappings).
    • withMapping

      Returns an operation prefix that causes a method to operate on binary mappings of this array and the other array.
      Parameters:
      combiner - the combiner
      other - the other array
      Returns:
      operation prefix
      Throws:
      IllegalArgumentException - if other array is a filtered view (all filters must precede all mappings).
    • withIndexedMapping

      public abstract <V> ParallelLongArrayWithMapping<V> withIndexedMapping(Ops.IntAndDoubleToObject<? extends V> mapper)
      Returns an operation prefix that causes a method to operate on mappings of this array using the given mapper that accepts as arguments an element's current index and value (as mapped by preceding mappings, if any), and produces a new value.
      Parameters:
      mapper - the mapper
      Returns:
      operation prefix
    • withIndexedMapping

      public abstract ParallelLongArrayWithDoubleMapping withIndexedMapping(Ops.IntAndDoubleToDouble mapper)
      Returns an operation prefix that causes a method to operate on mappings of this array using the given mapper that accepts as arguments an element's current index and value (as mapped by preceding mappings, if any), and produces a new value.
      Parameters:
      mapper - the mapper
      Returns:
      operation prefix
    • withIndexedMapping

      public abstract ParallelLongArrayWithLongMapping withIndexedMapping(Ops.IntAndDoubleToLong mapper)
      Returns an operation prefix that causes a method to operate on mappings of this array using the given mapper that accepts as arguments an element's current index and value (as mapped by preceding mappings, if any), and produces a new value.
      Parameters:
      mapper - the mapper
      Returns:
      operation prefix
    • sequentially

      public Iterable<Double> sequentially()
      Returns an Iterable view to sequentially step through mapped elements also obeying bound and filter constraints, without performing computations to evaluate them in parallel
      Returns:
      the Iterable view