public final class NumberList<N extends Number> extends Object implements List<N>, RandomAccess, Access1D<N>, Access1D.Visitable<N>, Mutate1D, Mutate1D.Mixable<N>
ArrayList
that can only contain numbers, but with a few extra features. Among
other things it can be arbitrarily large (using long indices rather than int) and contain primitive double
values. And of course it integrates perfectly with everything else in ojAlgo.Modifier and Type | Class and Description |
---|---|
static class |
NumberList.ListFactory<N extends Number> |
Access1D.Aggregatable<N extends Number>, Access1D.Collectable<N extends Number,R extends Mutate1D.Receiver<N>>, Access1D.Elements, Access1D.ElementView<N extends Number>, Access1D.IndexOf, Access1D.Sliceable<N extends Number>, Access1D.Visitable<N extends Number>
Mutate1D.Fillable<N extends Number>, Mutate1D.Mixable<N extends Number>, Mutate1D.Modifiable<N extends Number>, Mutate1D.ModifiableReceiver<N extends Number>, Mutate1D.Receiver<N extends Number>, Mutate1D.Sortable
Structure1D.BasicMapper<T>, Structure1D.IndexCallback, Structure1D.IndexMapper<T>, Structure1D.IntIndex, Structure1D.Logical<S extends Structure1D,B extends Structure1D.Logical<S,?>>, Structure1D.LongIndex, Structure1D.LoopCallback
Modifier and Type | Method and Description |
---|---|
boolean |
add(double element) |
void |
add(int index,
N element) |
void |
add(long index,
double addend) |
void |
add(long index,
Number addend) |
boolean |
add(N element) |
boolean |
addAll(Collection<? extends N> elements) |
boolean |
addAll(double[] elements) |
boolean |
addAll(int index,
Collection<? extends N> elements) |
N |
aggregateRange(long first,
long limit,
Aggregator aggregator) |
long |
capacity()
The current capacity of the underlying data structure.
|
void |
clear() |
static <N extends Number> |
collector(DenseArray.Factory<N> arrayFactory) |
boolean |
contains(Object object) |
boolean |
containsAll(Collection<?> c) |
long |
count() |
double |
doubleValue(long index) |
static <N extends Number> |
factory(DenseArray.Factory<N> arrayFactory) |
N |
get(int index) |
N |
get(long index) |
int |
indexOf(Object object) |
boolean |
isEmpty() |
Iterator<N> |
iterator() |
int |
lastIndexOf(Object object) |
ListIterator<N> |
listIterator() |
ListIterator<N> |
listIterator(int index) |
double |
mix(long index,
BinaryFunction<N> mixer,
double addend) |
N |
mix(long index,
BinaryFunction<N> mixer,
N addend) |
N |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> onlyKeep) |
N |
set(int index,
N element) |
void |
set(long index,
double value) |
void |
set(long index,
Number value) |
int |
size() |
NumberList<N> |
subList(int fromIndex,
int toIndex) |
Object[] |
toArray() |
<T> T[] |
toArray(T[] array) |
String |
toString() |
void |
visitOne(long index,
VoidFunction<N> visitor) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals, hashCode, replaceAll, sort, spliterator
parallelStream, removeIf, stream
asCollectable1D, asPrimitive1D, axpy, byteValue, dot, elements, equals, floatValue, hashCode, intValue, longValue, nonzeros, shortValue, supplyTo, toRawCopy1D, toString, wrap, wrap, wrap
visitAll, visitRange
copyComplexArgument, copyComplexImaginary, copyComplexModulus, copyComplexModulusAndArgument, copyComplexReal, copyComplexRealAndImaginary, reset
index, loopAll, loopMatching, loopRange, mapper
public static <N extends Number> Collector<N,NumberList<N>,NumberList<N>> collector(DenseArray.Factory<N> arrayFactory)
public static <N extends Number> NumberList.ListFactory<N> factory(DenseArray.Factory<N> arrayFactory)
public boolean add(double element)
public boolean add(N element)
public boolean addAll(Collection<? extends N> elements)
public boolean addAll(double[] elements)
public boolean addAll(int index, Collection<? extends N> elements)
public N aggregateRange(long first, long limit, Aggregator aggregator)
public long capacity()
public void clear()
public boolean contains(Object object)
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<N extends Number>
containsAll
in interface List<N extends Number>
public long count()
count
in interface Structure1D
public double doubleValue(long index)
doubleValue
in interface Access1D<N extends Number>
public boolean isEmpty()
public int lastIndexOf(Object object)
lastIndexOf
in interface List<N extends Number>
public ListIterator<N> listIterator()
listIterator
in interface List<N extends Number>
public ListIterator<N> listIterator(int index)
listIterator
in interface List<N extends Number>
public double mix(long index, BinaryFunction<N> mixer, double addend)
mix
in interface Mutate1D.Mixable<N extends Number>
public N mix(long index, BinaryFunction<N> mixer, N addend)
mix
in interface Mutate1D.Mixable<N extends Number>
public boolean remove(Object o)
public boolean removeAll(Collection<?> c)
public boolean retainAll(Collection<?> onlyKeep)
public int size()
size
in interface Collection<N extends Number>
size
in interface List<N extends Number>
size
in interface Structure1D
public NumberList<N> subList(int fromIndex, int toIndex)
public Object[] toArray()
public <T> T[] toArray(T[] array)
public void visitOne(long index, VoidFunction<N> visitor)
visitOne
in interface Access1D.Visitable<N extends Number>
Copyright © 2019 Optimatika. All rights reserved.