Package org.ojalgo.array
Class ReferenceTypeArray<N extends java.lang.Comparable<N>>
- java.lang.Object
-
- org.ojalgo.array.BasicArray<N>
-
- org.ojalgo.array.DenseArray<N>
-
- org.ojalgo.array.PlainArray<N>
-
- org.ojalgo.array.ReferenceTypeArray<N>
-
- All Implemented Interfaces:
java.util.RandomAccess
,Access1D<N>
,Access1D.Aggregatable<N>
,Access1D.Collectable<N,Mutate1D>
,Access1D.Visitable<N>
,Factory1D.Builder<DenseArray<N>>
,Mutate1D
,Mutate1D.Fillable<N>
,Mutate1D.Modifiable<N>
,Mutate1D.Sortable
,Structure1D
- Direct Known Subclasses:
ArrayR256
,ScalarArray
public abstract class ReferenceTypeArray<N extends java.lang.Comparable<N>> extends PlainArray<N> implements Mutate1D.Sortable
A one- and/or arbitrary-dimensional array of Comparable.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.ojalgo.array.DenseArray
DenseArray.Factory<N extends java.lang.Comparable<N>>
-
Nested classes/interfaces inherited from interface org.ojalgo.structure.Access1D
Access1D.Aggregatable<N extends java.lang.Comparable<N>>, Access1D.Collectable<N extends java.lang.Comparable<N>,R extends Mutate1D>, Access1D.ElementView<N extends java.lang.Comparable<N>>, Access1D.SelectionView<N extends java.lang.Comparable<N>>, Access1D.Sliceable<N extends java.lang.Comparable<N>>, Access1D.Visitable<N extends java.lang.Comparable<N>>
-
Nested classes/interfaces inherited from interface org.ojalgo.structure.Mutate1D
Mutate1D.Fillable<N extends java.lang.Comparable<N>>, Mutate1D.Mixable<N extends java.lang.Comparable<N>>, Mutate1D.Modifiable<N extends java.lang.Comparable<N>>, Mutate1D.ModifiableReceiver<N extends java.lang.Comparable<N>>, Mutate1D.Receiver<N extends java.lang.Comparable<N>>, Mutate1D.Sortable
-
Nested classes/interfaces inherited from interface org.ojalgo.structure.Structure1D
Structure1D.BasicMapper<T>, Structure1D.IndexMapper<T>, Structure1D.IntIndex, Structure1D.Logical<S extends Structure1D,B extends Structure1D.Logical<S,B>>, Structure1D.LongIndex, Structure1D.LoopCallback
-
-
Field Summary
Fields Modifier and Type Field Description N[]
data
-
Fields inherited from class org.ojalgo.array.PlainArray
CHARACTERISTICS, MAX_SIZE
-
-
Constructor Summary
Constructors Constructor Description ReferenceTypeArray(DenseArray.Factory<N> factory, int length)
ReferenceTypeArray(DenseArray.Factory<N> factory, N[] data)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected N[]
copyOfData()
boolean
equals(java.lang.Object obj)
protected void
exchange(int firstA, int firstB, int step, int count)
protected void
fill(int first, int limit, int step, N value)
protected void
fill(int first, int limit, int step, NullaryFunction<?> supplier)
void
fillMatching(UnaryFunction<N> function, Access1D<N> arguments)
void
fillMatching(Access1D<?> values)
Will fill the elements of [this] with the corresponding input values, and in the process (if necessary) convert the elements to the correct type:void
fillMatching(Access1D<N> left, BinaryFunction<N> function, Access1D<N> right)
protected void
fillOne(int index, N value)
protected void
fillOne(int index, NullaryFunction<?> supplier)
N
get(int index)
int
hashCode()
protected void
modify(int first, int limit, int step, BinaryFunction<N> function, Access1D<N> right)
protected void
modify(int first, int limit, int step, UnaryFunction<N> function)
protected void
modify(int first, int limit, int step, Access1D<N> left, BinaryFunction<N> function)
(package private) void
modify(long extIndex, int intIndex, BinaryFunction<N> function, Access1D<N> right)
(package private) void
modify(long extIndex, int intIndex, UnaryFunction<N> function)
(package private) void
modify(long extIndex, int intIndex, Access1D<N> left, BinaryFunction<N> function)
protected void
modifyOne(int index, UnaryFunction<N> modifier)
void
reset()
Reset this mutable structure to some standard (all zeros) initial state.protected int
searchAscending(N value)
void
set(int index, double value)
void
set(int index, float value)
protected void
set(int index, java.lang.Comparable<?> value)
java.util.Spliterator<N>
spliterator()
(package private) N
valueOf(double value)
(package private) N
valueOf(float value)
(package private) N
valueOf(java.lang.Comparable<?> number)
protected void
visit(int first, int limit, int step, VoidFunction<N> visitor)
protected void
visitOne(int index, VoidFunction<N> visitor)
-
Methods inherited from class org.ojalgo.array.PlainArray
add, add, add, add, add, add, add, add, add, add, add, add, add, add, byteValue, byteValue, count, doubleValue, doubleValue, exchange, fill, fill, fillAll, fillAll, fillOne, fillRange, fillRange, floatValue, floatValue, get, indexOfLargest, indexOfLargest, intValue, intValue, isAbsolute, isSmall, longValue, longValue, modify, modify, modify, modifyOne, set, set, set, set, set, set, set, set, set, set, set, shortValue, shortValue, size, sortAscending, sortDescending, visit, visitOne
-
Methods inherited from class org.ojalgo.array.DenseArray
build
-
Methods inherited from class org.ojalgo.array.BasicArray
aggregateRange, factory, getMathType, indexOfLargest, isPrimitive, modifyAll, modifyMatching, modifyMatching, modifyRange, supplyTo, toString, visitAll, visitRange, wrapInArray1D, wrapInArray2D, wrapInArrayAnyD
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.ojalgo.structure.Access1D
asCollectable1D, asKeyed1D, axpy, dot, elements, nonzeros, select, supplyTo, toRawCopy1D
-
Methods inherited from interface org.ojalgo.structure.Access1D.Aggregatable
aggregateAll
-
Methods inherited from interface org.ojalgo.structure.Access1D.Collectable
collect
-
Methods inherited from interface org.ojalgo.structure.Mutate1D.Fillable
fillCompatible
-
Methods inherited from interface org.ojalgo.structure.Mutate1D.Sortable
sortAscending, sortDescending
-
Methods inherited from interface org.ojalgo.structure.Structure1D
count, size
-
-
-
-
Constructor Detail
-
ReferenceTypeArray
ReferenceTypeArray(DenseArray.Factory<N> factory, int length)
-
ReferenceTypeArray
ReferenceTypeArray(DenseArray.Factory<N> factory, N[] data)
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classBasicArray<N extends java.lang.Comparable<N>>
-
fillMatching
public void fillMatching(Access1D<?> values)
Description copied from interface:Mutate1D.Fillable
Will fill the elements of [this] with the corresponding input values, and in the process (if necessary) convert the elements to the correct type:
this(i) = values(i)
- Specified by:
fillMatching
in interfaceMutate1D.Fillable<N extends java.lang.Comparable<N>>
-
fillMatching
public void fillMatching(Access1D<N> left, BinaryFunction<N> function, Access1D<N> right)
- Specified by:
fillMatching
in interfaceMutate1D.Fillable<N extends java.lang.Comparable<N>>
-
fillMatching
public void fillMatching(UnaryFunction<N> function, Access1D<N> arguments)
- Specified by:
fillMatching
in interfaceMutate1D.Fillable<N extends java.lang.Comparable<N>>
-
get
public final N get(int index)
- Specified by:
get
in classPlainArray<N extends java.lang.Comparable<N>>
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classBasicArray<N extends java.lang.Comparable<N>>
-
reset
public final void reset()
Description copied from interface:Mutate1D
Reset this mutable structure to some standard (all zeros) initial state. It must still be usuable after this call, and the structure/size/shape must not change.
-
set
public final void set(int index, double value)
-
set
public final void set(int index, float value)
-
spliterator
public final java.util.Spliterator<N> spliterator()
-
copyOfData
protected final N[] copyOfData()
-
exchange
protected final void exchange(int firstA, int firstB, int step, int count)
- Specified by:
exchange
in classPlainArray<N extends java.lang.Comparable<N>>
-
fill
protected final void fill(int first, int limit, int step, N value)
- Specified by:
fill
in classPlainArray<N extends java.lang.Comparable<N>>
-
fill
protected final void fill(int first, int limit, int step, NullaryFunction<?> supplier)
- Specified by:
fill
in classPlainArray<N extends java.lang.Comparable<N>>
-
fillOne
protected final void fillOne(int index, N value)
- Specified by:
fillOne
in classPlainArray<N extends java.lang.Comparable<N>>
-
fillOne
protected final void fillOne(int index, NullaryFunction<?> supplier)
- Specified by:
fillOne
in classPlainArray<N extends java.lang.Comparable<N>>
-
modify
protected final void modify(int first, int limit, int step, Access1D<N> left, BinaryFunction<N> function)
- Specified by:
modify
in classPlainArray<N extends java.lang.Comparable<N>>
-
modify
protected final void modify(int first, int limit, int step, BinaryFunction<N> function, Access1D<N> right)
- Specified by:
modify
in classPlainArray<N extends java.lang.Comparable<N>>
-
modify
protected final void modify(int first, int limit, int step, UnaryFunction<N> function)
- Specified by:
modify
in classPlainArray<N extends java.lang.Comparable<N>>
-
modifyOne
protected final void modifyOne(int index, UnaryFunction<N> modifier)
- Specified by:
modifyOne
in classPlainArray<N extends java.lang.Comparable<N>>
-
searchAscending
protected final int searchAscending(N value)
- Specified by:
searchAscending
in classPlainArray<N extends java.lang.Comparable<N>>
-
set
protected final void set(int index, java.lang.Comparable<?> value)
- Specified by:
set
in classPlainArray<N extends java.lang.Comparable<N>>
-
visit
protected final void visit(int first, int limit, int step, VoidFunction<N> visitor)
- Specified by:
visit
in classPlainArray<N extends java.lang.Comparable<N>>
-
visitOne
protected void visitOne(int index, VoidFunction<N> visitor)
- Specified by:
visitOne
in classPlainArray<N extends java.lang.Comparable<N>>
-
modify
final void modify(long extIndex, int intIndex, Access1D<N> left, BinaryFunction<N> function)
- Specified by:
modify
in classDenseArray<N extends java.lang.Comparable<N>>
-
modify
final void modify(long extIndex, int intIndex, BinaryFunction<N> function, Access1D<N> right)
- Specified by:
modify
in classDenseArray<N extends java.lang.Comparable<N>>
-
modify
final void modify(long extIndex, int intIndex, UnaryFunction<N> function)
- Specified by:
modify
in classDenseArray<N extends java.lang.Comparable<N>>
-
valueOf
final N valueOf(java.lang.Comparable<?> number)
-
valueOf
final N valueOf(double value)
-
valueOf
final N valueOf(float value)
-
-