Package org.ojalgo.array
Class ReferenceTypeArray<N extends 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:
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 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 Comparable<N>>
Nested classes/interfaces inherited from interface org.ojalgo.structure.Access1D
Access1D.Aggregatable<N extends Comparable<N>>, Access1D.Collectable<N extends Comparable<N>,
R extends Mutate1D>, Access1D.ElementView<N extends Comparable<N>>, Access1D.SelectionView<N extends Comparable<N>>, Access1D.Sliceable<N extends Comparable<N>>, Access1D.Visitable<N extends Comparable<N>> Nested classes/interfaces inherited from interface org.ojalgo.structure.Mutate1D
Mutate1D.Fillable<N extends Comparable<N>>, Mutate1D.Mixable<N extends Comparable<N>>, Mutate1D.Modifiable<N extends Comparable<N>>, Mutate1D.ModifiableReceiver<N extends Comparable<N>>, Mutate1D.Receiver<N extends 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
FieldsFields inherited from class org.ojalgo.array.PlainArray
CHARACTERISTICS, MAX_SIZE
-
Constructor Summary
ConstructorsConstructorDescriptionReferenceTypeArray
(DenseArray.Factory<N> factory, int length) ReferenceTypeArray
(DenseArray.Factory<N> factory, N[] data) -
Method Summary
Modifier and TypeMethodDescriptionprotected final N[]
boolean
protected final void
exchange
(int firstA, int firstB, int step, int count) protected final void
protected final 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 final void
protected final void
fillOne
(int index, NullaryFunction<?> supplier) final N
get
(int index) int
hashCode()
protected final void
modify
(int first, int limit, int step, BinaryFunction<N> function, Access1D<N> right) protected final void
modify
(int first, int limit, int step, UnaryFunction<N> function) protected final void
modify
(int first, int limit, int step, Access1D<N> left, BinaryFunction<N> function) (package private) final void
modify
(long extIndex, int intIndex, BinaryFunction<N> function, Access1D<N> right) (package private) final void
modify
(long extIndex, int intIndex, UnaryFunction<N> function) (package private) final void
modify
(long extIndex, int intIndex, Access1D<N> left, BinaryFunction<N> function) protected final void
modifyOne
(int index, UnaryFunction<N> modifier) final void
reset()
Reset this mutable structure to some standard (all zeros) initial state.protected final int
searchAscending
(N value) final void
set
(int index, double value) final void
set
(int index, float value) protected final void
set
(int index, Comparable<?> value) final Spliterator
<N> (package private) final N
valueOf
(double value) (package private) final N
valueOf
(float value) (package private) final N
valueOf
(Comparable<?> number) protected final 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
-
Field Details
-
data
-
-
Constructor Details
-
ReferenceTypeArray
ReferenceTypeArray(DenseArray.Factory<N> factory, int length) -
ReferenceTypeArray
ReferenceTypeArray(DenseArray.Factory<N> factory, N[] data)
-
-
Method Details
-
equals
- Overrides:
equals
in classBasicArray<N extends Comparable<N>>
-
fillMatching
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 Comparable<N>>
-
fillMatching
- Specified by:
fillMatching
in interfaceMutate1D.Fillable<N extends Comparable<N>>
-
fillMatching
- Specified by:
fillMatching
in interfaceMutate1D.Fillable<N extends Comparable<N>>
-
get
- Specified by:
get
in classPlainArray<N extends Comparable<N>>
-
hashCode
public int hashCode()- Overrides:
hashCode
in classBasicArray<N extends 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) - Specified by:
set
in interfaceMutate1D
- Specified by:
set
in classPlainArray<N extends Comparable<N>>
-
set
public final void set(int index, float value) - Specified by:
set
in interfaceMutate1D
- Overrides:
set
in classPlainArray<N extends Comparable<N>>
-
spliterator
-
copyOfData
-
exchange
protected final void exchange(int firstA, int firstB, int step, int count) - Specified by:
exchange
in classPlainArray<N extends Comparable<N>>
-
fill
- Specified by:
fill
in classPlainArray<N extends Comparable<N>>
-
fill
- Specified by:
fill
in classPlainArray<N extends Comparable<N>>
-
fillOne
- Specified by:
fillOne
in classPlainArray<N extends Comparable<N>>
-
fillOne
- Specified by:
fillOne
in classPlainArray<N extends 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 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 Comparable<N>>
-
modify
- Specified by:
modify
in classPlainArray<N extends Comparable<N>>
-
modifyOne
- Specified by:
modifyOne
in classPlainArray<N extends Comparable<N>>
-
searchAscending
- Specified by:
searchAscending
in classPlainArray<N extends Comparable<N>>
-
set
- Specified by:
set
in classPlainArray<N extends Comparable<N>>
-
visit
- Specified by:
visit
in classPlainArray<N extends Comparable<N>>
-
visitOne
- Specified by:
visitOne
in classPlainArray<N extends Comparable<N>>
-
modify
- Specified by:
modify
in classDenseArray<N extends Comparable<N>>
-
modify
- Specified by:
modify
in classDenseArray<N extends Comparable<N>>
-
modify
- Specified by:
modify
in classDenseArray<N extends Comparable<N>>
-
valueOf
-
valueOf
-
valueOf
-