public class ParallelDoubleArray extends AbstractParallelAnyArray.DUPap
ParallelArray, but specialized for scalar doubles. It additionally
provides a few methods specific to numerical values.| Modifier and Type | Class and Description |
|---|---|
(package private) class |
ParallelDoubleArray.AsList |
(package private) class |
ParallelDoubleArray.ListIter |
(package private) static class |
ParallelDoubleArray.ParallelDoubleArrayIterator |
static interface |
ParallelDoubleArray.SummaryStatistics
Summary statistics for a possibly bounded, filtered, and/or
mapped ParallelDoubleArray.
|
AbstractParallelAnyArray.AndPredicate<T>, AbstractParallelAnyArray.DDCPap, AbstractParallelAnyArray.DDMPap, AbstractParallelAnyArray.DFDCPap, AbstractParallelAnyArray.DFDMPap, AbstractParallelAnyArray.DFLCPap, AbstractParallelAnyArray.DFLMPap, AbstractParallelAnyArray.DFOCPap<U>, AbstractParallelAnyArray.DFOMPap<U>, AbstractParallelAnyArray.DFPap, AbstractParallelAnyArray.DLCPap, AbstractParallelAnyArray.DLMPap, AbstractParallelAnyArray.DOCPap<U>, AbstractParallelAnyArray.DOMPap<U>, AbstractParallelAnyArray.DPap, AbstractParallelAnyArray.DRDCPap, AbstractParallelAnyArray.DRDMPap, AbstractParallelAnyArray.DRLCPap, AbstractParallelAnyArray.DRLMPap, AbstractParallelAnyArray.DROCPap<U>, AbstractParallelAnyArray.DROMPap<U>, AbstractParallelAnyArray.DRPap, AbstractParallelAnyArray.DUDCPap, AbstractParallelAnyArray.DUDMPap, AbstractParallelAnyArray.DULCPap, AbstractParallelAnyArray.DULMPap, AbstractParallelAnyArray.DUOCPap<U>, AbstractParallelAnyArray.DUOMPap<U>, AbstractParallelAnyArray.DUPap, AbstractParallelAnyArray.FilteredAsDoubleIterator, AbstractParallelAnyArray.FilteredAsLongIterator, AbstractParallelAnyArray.FilteredIterator<U>, AbstractParallelAnyArray.LDCPap, AbstractParallelAnyArray.LDMPap, AbstractParallelAnyArray.LFDCPap, AbstractParallelAnyArray.LFDMPap, AbstractParallelAnyArray.LFLCPap, AbstractParallelAnyArray.LFLMPap, AbstractParallelAnyArray.LFOCPap<U>, AbstractParallelAnyArray.LFOMPap<U>, AbstractParallelAnyArray.LFPap, AbstractParallelAnyArray.LLCPap, AbstractParallelAnyArray.LLMPap, AbstractParallelAnyArray.LOCPap<U>, AbstractParallelAnyArray.LOMPap<U>, AbstractParallelAnyArray.LPap, AbstractParallelAnyArray.LRDCPap, AbstractParallelAnyArray.LRDMPap, AbstractParallelAnyArray.LRLCPap, AbstractParallelAnyArray.LRLMPap, AbstractParallelAnyArray.LROCPap<U>, AbstractParallelAnyArray.LROMPap<U>, AbstractParallelAnyArray.LRPap, AbstractParallelAnyArray.LUDCPap, AbstractParallelAnyArray.LUDMPap, AbstractParallelAnyArray.LULCPap, AbstractParallelAnyArray.LULMPap, AbstractParallelAnyArray.LUOCPap<U>, AbstractParallelAnyArray.LUOMPap<U>, AbstractParallelAnyArray.LUPap, AbstractParallelAnyArray.ODCPap<T>, AbstractParallelAnyArray.ODMPap<T>, AbstractParallelAnyArray.OFDCPap<T>, AbstractParallelAnyArray.OFDMPap<T>, AbstractParallelAnyArray.OFLCPap<T>, AbstractParallelAnyArray.OFLMPap<T>, AbstractParallelAnyArray.OFOCPap<T,U>, AbstractParallelAnyArray.OFOMPap<T,U>, AbstractParallelAnyArray.OFPap<T>, AbstractParallelAnyArray.OLCPap<T>, AbstractParallelAnyArray.OLMPap<T>, AbstractParallelAnyArray.OOCPap<T,U>, AbstractParallelAnyArray.OOMPap<T,U>, AbstractParallelAnyArray.OPap<T>, AbstractParallelAnyArray.ORDCPap<T>, AbstractParallelAnyArray.ORDMPap<T>, AbstractParallelAnyArray.ORLCPap<T>, AbstractParallelAnyArray.ORLMPap<T>, AbstractParallelAnyArray.OROCPap<T,U>, AbstractParallelAnyArray.OROMPap<T,U>, AbstractParallelAnyArray.ORPap<T>, AbstractParallelAnyArray.OUDCPap<T>, AbstractParallelAnyArray.OUDMPap<T>, AbstractParallelAnyArray.OULCPap<T>, AbstractParallelAnyArray.OULMPap<T>, AbstractParallelAnyArray.OUOCPap<T,U>, AbstractParallelAnyArray.OUOMPap<T,U>, AbstractParallelAnyArray.OUPap<T>, AbstractParallelAnyArray.Sequentially<U>, AbstractParallelAnyArray.SequentiallyAsDouble, AbstractParallelAnyArray.SequentiallyAsLong, AbstractParallelAnyArray.UnfilteredAsDoubleIterator, AbstractParallelAnyArray.UnfilteredAsLongIterator, AbstractParallelAnyArray.UnfilteredIterator<U>| Modifier and Type | Field and Description |
|---|---|
(package private) ParallelDoubleArray.AsList |
listView |
arrayex, fence, origin, threshold| Modifier | Constructor and Description |
|---|---|
(package private) |
ParallelDoubleArray(java.util.concurrent.ForkJoinPool executor,
double[] array)
Trusted internal version of protected constructor.
|
protected |
ParallelDoubleArray(java.util.concurrent.ForkJoinPool executor,
double[] array,
int limit)
Constructor for use by subclasses to create a new ParallelDoubleArray
using the given executor, and initially using the supplied
array, with effective size bound by the given limit.
|
| Modifier and Type | Method and Description |
|---|---|
ParallelDoubleArray |
addAll(double[] other)
Equivalent to
asList().addAll but specialized for
array arguments and likely to be more efficient. |
ParallelDoubleArray |
addAll(ParallelDoubleArrayWithDoubleMapping other)
Appends all (possibly bounded, filtered, or mapped) elements of
the given ParallelDoubleArray, resizing and/or reallocating this
array if necessary.
|
ParallelDoubleArray |
all()
Returns a new ParallelDoubleArray holding all elements.
|
ParallelDoubleArray |
allUniqueElements()
Returns a new ParallelDoubleArray containing only the unique
elements of this array (that is, without any duplicates).
|
(package private) void |
appendElement(double e) |
void |
apply(Ops.DoubleProcedure procedure)
Applies the given procedure to elements.
|
java.util.List<java.lang.Double> |
asList()
Returns a view of this ParallelDoubleArray as a List.
|
int |
binarySearch(double target)
Assuming this array is sorted, returns the index of an element
equal to given target, or -1 if not present.
|
int |
binarySearch(double target,
Ops.DoubleComparator comparator)
Assuming this array is sorted with respect to the given
comparator, returns the index of an element equal to given
target, or -1 if not present.
|
static ParallelDoubleArray |
create(int size,
java.util.concurrent.ForkJoinPool executor)
Creates a new ParallelDoubleArray using the given executor and
an array of the given size.
|
static ParallelDoubleArray |
createEmpty(int size,
java.util.concurrent.ForkJoinPool executor)
Creates a new ParallelDoubleArray using the given executor and
an array of the given size, but with an initial effective size
of zero, enabling incremental insertion via
asList() operations. |
static ParallelDoubleArray |
createFromCopy(double[] source,
java.util.concurrent.ForkJoinPool executor)
Creates a new ParallelDoubleArray using the given executor and
initially holding copies of the given
source elements.
|
static ParallelDoubleArray |
createFromCopy(int size,
double[] source,
java.util.concurrent.ForkJoinPool executor)
Creates a new ParallelDoubleArray using an array of the given size,
initially holding copies of the given source truncated or
padded with zeros to obtain the specified length.
|
static ParallelDoubleArray |
createUsingHandoff(double[] handoff,
java.util.concurrent.ForkJoinPool executor)
Creates a new ParallelDoubleArray initially using the given array and
executor.
|
ParallelDoubleArray |
cumulate(Ops.DoubleReducer reducer,
double base)
Replaces each element with the running cumulation of applying
the given reducer.
|
ParallelDoubleArray |
cumulateSum()
Replaces each element with the running sum.
|
static java.util.concurrent.ForkJoinPool |
defaultExecutor()
Returns a common default executor for use in ParallelArrays.
|
double |
get(int i)
Returns the element of the array at the given index.
|
double[] |
getArray()
Returns the underlying array used for computations.
|
java.util.concurrent.ForkJoinPool |
getExecutor()
Returns the executor used for computations.
|
boolean |
hasAllEqualElements(ParallelDoubleArrayWithDoubleMapping other)
Returns true if all elements at the same relative positions
of this and other array are equal.
|
int |
indexOf(double target)
Returns the index of some element equal to given target, or -1
if not present.
|
(package private) void |
insertElementAt(int index,
double e) |
(package private) void |
insertSlotsAt(int index,
int len)
Makes len slots available at index.
|
java.util.Iterator<java.lang.Double> |
iterator()
Returns an iterator stepping through each element of the array
up to the current limit.
|
double |
max()
Returns the maximum element, or -Double.MAX_VALUE if empty.
|
double |
max(Ops.DoubleComparator comparator)
Returns the maximum element, or -Double.MAX_VALUE if empty.
|
double |
min()
Returns the minimum element, or Double.MAX_VALUE if empty.
|
double |
min(Ops.DoubleComparator comparator)
Returns the minimum element, or Double.MAX_VALUE if empty.
|
double |
precumulate(Ops.DoubleReducer reducer,
double base)
Replaces each element with the cumulation of applying the given
reducer to all previous values, and returns the total
reduction.
|
double |
precumulateSum()
Replaces each element with its prefix sum.
|
double |
reduce(Ops.DoubleReducer reducer,
double base)
Returns reduction of elements.
|
ParallelDoubleArray |
removeAll(Ops.DoublePredicate selector)
Removes from the array all elements for which the given
selector holds.
|
ParallelDoubleArray |
removeConsecutiveDuplicates()
Removes consecutive elements that are equal,
shifting others leftward, and possibly decreasing size.
|
(package private) void |
removeSlotAt(int index) |
(package private) void |
removeSlotsAt(int fromIndex,
int toIndex) |
ParallelDoubleArray |
replaceWithGeneratedValue(Ops.DoubleGenerator generator)
Replaces elements with the results of applying the given
generator.
|
ParallelDoubleArray |
replaceWithMappedIndex(Ops.IntAndDoubleToDouble op)
Replaces elements with the results of applying the given
mapping to each index and current element value.
|
ParallelDoubleArray |
replaceWithMappedIndex(Ops.IntToDouble op)
Replaces elements with the results of applying the given
op to their indices.
|
ParallelDoubleArray |
replaceWithMapping(Ops.BinaryDoubleOp combiner,
double[] other)
Replaces elements with results of applying
op(thisElement, otherElement). |
ParallelDoubleArray |
replaceWithMapping(Ops.BinaryDoubleOp combiner,
ParallelDoubleArrayWithDoubleMapping other)
Replaces elements with results of applying
op(thisElement, otherElement). |
ParallelDoubleArray |
replaceWithMapping(Ops.DoubleOp op)
Replaces elements with the results of applying the given op
to their current values.
|
ParallelDoubleArray |
replaceWithValue(double value)
Replaces elements with the given value.
|
(package private) void |
resizeArray(int newCap) |
(package private) int |
seqIndexOf(double target) |
(package private) int |
seqLastIndexOf(double target) |
void |
set(int i,
double x)
Sets the element of the array at the given index to the given value.
|
void |
setLimit(int newLimit)
Ensures that the underlying array can be accessed up to the
given upper bound, reallocating and copying the underlying
array to expand if necessary.
|
int |
size()
Returns the effective size of the underlying array.
|
ParallelDoubleArray |
sort()
Sorts the array, assuming all elements are Comparable.
|
ParallelDoubleArray |
sort(Ops.DoubleComparator comparator)
Sorts the array.
|
double |
sum()
Returns the sum of elements.
|
ParallelDoubleArray.SummaryStatistics |
summary()
Returns summary statistics, using natural comparator.
|
ParallelDoubleArray.SummaryStatistics |
summary(Ops.DoubleComparator comparator)
Returns summary statistics, using the given comparator
to locate minimum and maximum elements.
|
java.lang.String |
toString()
Equivalent to
asList().toString(). |
ParallelDoubleArrayWithBounds |
withBounds(int firstIndex,
int upperBound)
Returns an operation prefix that causes a method to
operate only on the elements of the array between
firstIndex (inclusive) and upperBound (exclusive).
|
ParallelDoubleArrayWithFilter |
withFilter(Ops.BinaryDoublePredicate selector,
ParallelDoubleArrayWithDoubleMapping other)
Returns an operation prefix that causes a method to operate
only on elements for which the given binary selector returns
true.
|
ParallelDoubleArrayWithFilter |
withFilter(Ops.DoublePredicate selector)
Returns an operation prefix that causes a method to operate
only on the elements of the array for which the given selector
returns true.
|
ParallelDoubleArrayWithFilter |
withIndexedFilter(Ops.IntAndDoublePredicate selector)
Returns an operation prefix that causes a method to operate
only on elements for which the given indexed selector returns
true.
|
ParallelDoubleArrayWithDoubleMapping |
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, and produces a
new value.
|
ParallelDoubleArrayWithLongMapping |
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, and produces a
new value.
|
<U> ParallelDoubleArrayWithMapping<U> |
withIndexedMapping(Ops.IntAndDoubleToObject<? extends U> 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, and produces a
new value.
|
ParallelDoubleArrayWithDoubleMapping |
withMapping(Ops.BinaryDoubleOp combiner,
ParallelDoubleArrayWithDoubleMapping other)
Returns an operation prefix that causes a method to operate
on binary mappings of this array and the other array.
|
ParallelDoubleArrayWithLongMapping |
withMapping(Ops.DoubleAndDoubleToLong combiner,
ParallelDoubleArrayWithDoubleMapping other)
Returns an operation prefix that causes a method to operate
on binary mappings of this array and the other array.
|
<V> ParallelDoubleArrayWithMapping<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.
|
ParallelDoubleArrayWithDoubleMapping |
withMapping(Ops.DoubleAndLongToDouble combiner,
ParallelLongArrayWithLongMapping other)
Returns an operation prefix that causes a method to operate
on binary mappings of this array and the other array.
|
ParallelDoubleArrayWithLongMapping |
withMapping(Ops.DoubleAndLongToLong combiner,
ParallelLongArrayWithLongMapping other)
Returns an operation prefix that causes a method to operate
on binary mappings of this array and the other array.
|
<V> ParallelDoubleArrayWithMapping<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.
|
<V,W> ParallelDoubleArrayWithDoubleMapping |
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.
|
<V,W> ParallelDoubleArrayWithLongMapping |
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.
|
<V,W,X> ParallelDoubleArrayWithMapping<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.
|
ParallelDoubleArrayWithDoubleMapping |
withMapping(Ops.DoubleOp op)
Returns an operation prefix that causes a method to operate
on mapped elements of the array using the given op.
|
ParallelDoubleArrayWithLongMapping |
withMapping(Ops.DoubleToLong op)
Returns an operation prefix that causes a method to operate
on mapped elements of the array using the given op.
|
<U> ParallelDoubleArrayWithMapping<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.
|
leafApply, leafBinaryIndexMap, leafCombineInPlace, leafCombineInPlace, leafFill, leafGenerate, leafIndexMap, leafReduce, leafTransformdget, leafTransfer, leafTransferByIndexsequentiallydgetArray, leafMoveByIndex, leafMoveSelected, lget, ogetallDoubles, allLongs, allObjects, anyIndex, boundsCheck, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedOp, compoundIndexedSelector, compoundIndexedSelector, compoundIndexedSelector, compoundIndexedSelector, compoundIndexedSelector, compoundIndexedSelector, compoundIndexedSelector, compoundIndexedSelector, compoundIndexedSelector, computeThreshold, getThreshold, hasFilter, hasMap, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedMapper, indexedSelector, indexedSelector, indexedSelector, isEmpty, isSelected, leafApply, leafApply, leafBinaryIndexMap, leafBinaryIndexMap, leafCombineInPlace, leafCombineInPlace, leafCombineInPlace, leafCombineInPlace, leafFill, leafFill, leafGenerate, leafGenerate, leafIndexMap, leafIndexMap, leafIndexSelected, leafReduce, leafReduce, leafTransfer, leafTransfer, leafTransferByIndex, leafTransferByIndex, leafTransform, leafTransform, lgetArray, ogetArrayParallelDoubleArray.AsList listView
protected ParallelDoubleArray(java.util.concurrent.ForkJoinPool executor,
double[] array,
int limit)
create(int, java.util.concurrent.ForkJoinPool),
createEmpty(int, java.util.concurrent.ForkJoinPool), createUsingHandoff(double[], java.util.concurrent.ForkJoinPool) or createFromCopy(double[], java.util.concurrent.ForkJoinPool).executor - the executorarray - the arraylimit - the upper bound limitParallelDoubleArray(java.util.concurrent.ForkJoinPool executor,
double[] array)
public static java.util.concurrent.ForkJoinPool defaultExecutor()
public static ParallelDoubleArray create(int size, java.util.concurrent.ForkJoinPool executor)
size - the array sizeexecutor - the executorpublic static ParallelDoubleArray createUsingHandoff(double[] handoff, java.util.concurrent.ForkJoinPool executor)
handoff - the arrayexecutor - the executorpublic static ParallelDoubleArray createFromCopy(double[] source, java.util.concurrent.ForkJoinPool executor)
source - the source of initial elementsexecutor - the executorpublic static ParallelDoubleArray createFromCopy(int size, double[] source, java.util.concurrent.ForkJoinPool executor)
source - the source of initial elementssize - the array sizeexecutor - the executorpublic static ParallelDoubleArray createEmpty(int size, java.util.concurrent.ForkJoinPool executor)
asList() operations.size - the array sizeexecutor - the executorpublic java.util.concurrent.ForkJoinPool getExecutor()
public void apply(Ops.DoubleProcedure procedure)
apply in class ParallelDoubleArrayWithDoubleMappingprocedure - the procedurepublic double reduce(Ops.DoubleReducer reducer, double base)
reduce in class ParallelDoubleArrayWithDoubleMappingreducer - the reducerbase - the result for an empty arraypublic ParallelDoubleArray all()
all in class ParallelDoubleArrayWithDoubleMappingpublic ParallelDoubleArray replaceWithMapping(Ops.DoubleOp op)
replaceWithMapping in class ParallelDoubleArrayWithFilterop - the oppublic ParallelDoubleArray replaceWithMappedIndex(Ops.IntToDouble op)
replaceWithMappedIndex in class ParallelDoubleArrayWithFilterop - the oppublic ParallelDoubleArray replaceWithMappedIndex(Ops.IntAndDoubleToDouble op)
replaceWithMappedIndex in class ParallelDoubleArrayWithFilterop - the oppublic ParallelDoubleArray replaceWithGeneratedValue(Ops.DoubleGenerator generator)
replaceWithGeneratedValue(Ops.doubleRandom()).replaceWithGeneratedValue in class ParallelDoubleArrayWithFiltergenerator - the generatorpublic ParallelDoubleArray replaceWithValue(double value)
replaceWithValue in class ParallelDoubleArrayWithFiltervalue - the valuepublic ParallelDoubleArray replaceWithMapping(Ops.BinaryDoubleOp combiner, ParallelDoubleArrayWithDoubleMapping other)
op(thisElement, otherElement).replaceWithMapping in class ParallelDoubleArrayWithFilterother - the other arraycombiner - the combinerjava.lang.ArrayIndexOutOfBoundsException - if other array has
fewer elements than this arraypublic ParallelDoubleArray replaceWithMapping(Ops.BinaryDoubleOp combiner, double[] other)
op(thisElement, otherElement).replaceWithMapping in class ParallelDoubleArrayWithFilterother - the other arraycombiner - the combinerjava.lang.ArrayIndexOutOfBoundsException - if other array has
fewer elements than this arraypublic int indexOf(double target)
indexOf in class AbstractParallelAnyArray.DUPaptarget - the element to search forpublic int binarySearch(double target)
binarySearch in class AbstractParallelAnyArray.DUPaptarget - the element to search forpublic int binarySearch(double target,
Ops.DoubleComparator comparator)
binarySearch in class AbstractParallelAnyArray.DUPaptarget - the element to search forcomparator - the comparatorpublic ParallelDoubleArray.SummaryStatistics summary(Ops.DoubleComparator comparator)
summary in class ParallelDoubleArrayWithDoubleMappingcomparator - the comparator to use for
locating minimum and maximum elementspublic ParallelDoubleArray.SummaryStatistics summary()
summary in class ParallelDoubleArrayWithDoubleMappingpublic double min(Ops.DoubleComparator comparator)
min in class ParallelDoubleArrayWithDoubleMappingcomparator - the comparatorpublic double min()
min in class ParallelDoubleArrayWithDoubleMappingpublic double max(Ops.DoubleComparator comparator)
max in class ParallelDoubleArrayWithDoubleMappingcomparator - the comparatorpublic double max()
max in class ParallelDoubleArrayWithDoubleMappingpublic ParallelDoubleArray cumulate(Ops.DoubleReducer reducer, double base)
1, 2, 3, and the reducer operation adds numbers, then
after invocation of this method, the contents would be 1,
3, 6 (that is, 1, 1+2, 1+2+3).cumulate in class AbstractParallelAnyArray.DUPapreducer - the reducerbase - the result for an empty arraypublic double precumulate(Ops.DoubleReducer reducer, double base)
1,
2, 3, and the reducer operation adds numbers, then after
invocation of this method, the contents would be 0, 1,
3 (that is, 0, 0+1, 0+1+2, and the return value
would be 6 (that is, 1+2+3).precumulate in class AbstractParallelAnyArray.DUPapreducer - the reducerbase - the result for an empty arraypublic ParallelDoubleArray sort(Ops.DoubleComparator comparator)
sort in class AbstractParallelAnyArray.DUPapcomparator - the comparator to usepublic ParallelDoubleArray sort()
sort in class AbstractParallelAnyArray.DUPapjava.lang.ClassCastException - if any element is not Comparablepublic ParallelDoubleArray removeConsecutiveDuplicates()
public ParallelDoubleArray addAll(double[] other)
asList().addAll but specialized for
array arguments and likely to be more efficient.other - the elements to addpublic ParallelDoubleArray addAll(ParallelDoubleArrayWithDoubleMapping other)
other - the elements to addpublic ParallelDoubleArray allUniqueElements()
allUniqueElements in class ParallelDoubleArrayWithFilterpublic ParallelDoubleArray removeAll(Ops.DoublePredicate selector)
selector - the selectorpublic boolean hasAllEqualElements(ParallelDoubleArrayWithDoubleMapping other)
hasAllEqualElements in class ParallelDoubleArrayWithFilterother - the other arraypublic double sum()
sum in class ParallelDoubleArrayWithDoubleMappingpublic ParallelDoubleArray cumulateSum()
cumulateSum in class AbstractParallelAnyArray.DUPappublic double precumulateSum()
precumulateSum in class AbstractParallelAnyArray.DUPappublic ParallelDoubleArrayWithBounds withBounds(int firstIndex, int upperBound)
withBounds in class AbstractParallelAnyArray.DUPapfirstIndex - the lower bound (inclusive)upperBound - the upper bound (exclusive)public ParallelDoubleArrayWithFilter withFilter(Ops.DoublePredicate selector)
withFilter in class AbstractParallelAnyArray.DUPapselector - the selectorpublic ParallelDoubleArrayWithFilter withFilter(Ops.BinaryDoublePredicate selector, ParallelDoubleArrayWithDoubleMapping other)
withFilter in class ParallelDoubleArrayWithFilterselector - the selectorpublic ParallelDoubleArrayWithFilter withIndexedFilter(Ops.IntAndDoublePredicate selector)
withIndexedFilter in class AbstractParallelAnyArray.DUPapselector - the selectorpublic <U> ParallelDoubleArrayWithMapping<U> withMapping(Ops.DoubleToObject<? extends U> op)
withMapping in class AbstractParallelAnyArray.DUPapop - the oppublic ParallelDoubleArrayWithDoubleMapping withMapping(Ops.DoubleOp op)
withMapping in class AbstractParallelAnyArray.DUPapop - the oppublic ParallelDoubleArrayWithLongMapping withMapping(Ops.DoubleToLong op)
withMapping in class AbstractParallelAnyArray.DUPapop - the oppublic <V,W,X> ParallelDoubleArrayWithMapping<W> withMapping(Ops.DoubleAndObjectToObject<? super V,? extends W> combiner, ParallelArrayWithMapping<X,V> other)
withMapping in class ParallelDoubleArrayWithDoubleMappingcombiner - the combinerother - the other arrayjava.lang.IllegalArgumentException - if other array is a
filtered view (all filters must precede all mappings)public <V> ParallelDoubleArrayWithMapping<V> withMapping(Ops.DoubleAndDoubleToObject<? extends V> combiner, ParallelDoubleArrayWithDoubleMapping other)
withMapping in class ParallelDoubleArrayWithDoubleMappingcombiner - the combinerother - the other arrayjava.lang.IllegalArgumentException - if other array is a
filtered view (all filters must precede all mappings)public <V> ParallelDoubleArrayWithMapping<V> withMapping(Ops.DoubleAndLongToObject<? extends V> combiner, ParallelLongArrayWithLongMapping other)
withMapping in class ParallelDoubleArrayWithDoubleMappingcombiner - the combinerother - the other arrayjava.lang.IllegalArgumentException - if other array is a
filtered view (all filters must precede all mappings)public <V,W> ParallelDoubleArrayWithDoubleMapping withMapping(Ops.DoubleAndObjectToDouble<? super V> combiner, ParallelArrayWithMapping<W,V> other)
withMapping in class ParallelDoubleArrayWithDoubleMappingcombiner - the combinerother - the other arrayjava.lang.IllegalArgumentException - if other array is a
filtered view (all filters must precede all mappings)public ParallelDoubleArrayWithDoubleMapping withMapping(Ops.BinaryDoubleOp combiner, ParallelDoubleArrayWithDoubleMapping other)
withMapping in class ParallelDoubleArrayWithDoubleMappingcombiner - the combinerother - the other arrayjava.lang.IllegalArgumentException - if other array is a
filtered view (all filters must precede all mappings)public ParallelDoubleArrayWithDoubleMapping withMapping(Ops.DoubleAndLongToDouble combiner, ParallelLongArrayWithLongMapping other)
withMapping in class ParallelDoubleArrayWithDoubleMappingcombiner - the combinerother - the other arrayjava.lang.IllegalArgumentException - if other array is a
filtered view (all filters must precede all mappings)public <V,W> ParallelDoubleArrayWithLongMapping withMapping(Ops.DoubleAndObjectToLong<? super V> combiner, ParallelArrayWithMapping<W,V> other)
withMapping in class ParallelDoubleArrayWithDoubleMappingcombiner - the combinerother - the other arrayjava.lang.IllegalArgumentException - if other array is a
filtered view (all filters must precede all mappings)public ParallelDoubleArrayWithLongMapping withMapping(Ops.DoubleAndDoubleToLong combiner, ParallelDoubleArrayWithDoubleMapping other)
withMapping in class ParallelDoubleArrayWithDoubleMappingcombiner - the combinerother - the other arrayjava.lang.IllegalArgumentException - if other array is a
filtered view (all filters must precede all mappings)public ParallelDoubleArrayWithLongMapping withMapping(Ops.DoubleAndLongToLong combiner, ParallelLongArrayWithLongMapping other)
withMapping in class ParallelDoubleArrayWithDoubleMappingcombiner - the combinerother - the other arrayjava.lang.IllegalArgumentException - if other array is a
filtered view (all filters must precede all mappings)public <U> ParallelDoubleArrayWithMapping<U> withIndexedMapping(Ops.IntAndDoubleToObject<? extends U> mapper)
withIndexedMapping in class AbstractParallelAnyArray.DUPapmapper - the mapperpublic ParallelDoubleArrayWithDoubleMapping withIndexedMapping(Ops.IntAndDoubleToDouble mapper)
withIndexedMapping in class AbstractParallelAnyArray.DUPapmapper - the mapperpublic ParallelDoubleArrayWithLongMapping withIndexedMapping(Ops.IntAndDoubleToLong mapper)
withIndexedMapping in class AbstractParallelAnyArray.DUPapmapper - the mapperpublic java.util.Iterator<java.lang.Double> iterator()
ListIterator supporting add, remove, and set
operations is available via asList().public java.util.List<java.lang.Double> asList()
ArrayList, and may be used to modify, replace or extend
the bounds of the array underlying this ParallelDoubleArray.
The methods supported by this list view are not in
general implemented as parallel operations. This list is also
not itself thread-safe. In particular, performing list updates
while other parallel operations are in progress has undefined
(and surely undesired) effects.public int size()
setLimit(int)), or the length of the array otherwise.size in class AbstractParallelAnyArraypublic double[] getArray()
public double get(int i)
i - the indexpublic void set(int i,
double x)
i - the indexx - the valuepublic java.lang.String toString()
asList().toString().toString in class java.lang.Objectpublic final void setLimit(int newLimit)
newLimit - the new upper boundjava.lang.IllegalArgumentException - if newLimit less than zerofinal void resizeArray(int newCap)
final void insertElementAt(int index,
double e)
final void appendElement(double e)
final void insertSlotsAt(int index,
int len)
final void removeSlotAt(int index)
final void removeSlotsAt(int fromIndex,
int toIndex)
final int seqIndexOf(double target)
final int seqLastIndexOf(double target)