Package org.ojalgo.array
Class ArrayZ016
- All Implemented Interfaces:
RandomAccess
,Access1D<Double>
,Access1D.Aggregatable<Double>
,Access1D.Collectable<Double,
,Mutate1D> Access1D.Visitable<Double>
,Factory1D.Builder<DenseArray<Double>>
,Mutate1D
,Mutate1D.Fillable<Double>
,Mutate1D.Modifiable<Double>
,Mutate1D.Sortable
,Structure1D
A one- and/or arbitrary-dimensional array of double.
-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
add
(int index, double addend) protected void
add
(int index, short addend) protected void
add
(int index, Comparable<?> addend) byte
byteValue
(int index) double
doubleValue
(int index) protected void
exchange
(int firstA, int firstB, int step, int count) protected void
protected void
fill
(int first, int limit, int step, NullaryFunction<?> supplier) protected void
protected void
fillOne
(int index, NullaryFunction<?> supplier) protected void
float
floatValue
(int index) final Double
get
(int index) protected int
indexOfLargest
(int first, int limit, int step) protected boolean
isAbsolute
(int index) protected boolean
isSmall
(int index, double comparedTo) static ArrayZ016
make
(int size) protected void
modify
(int first, int limit, int step, BinaryFunction<Double> function, Access1D<Double> right) protected void
modify
(int first, int limit, int step, UnaryFunction<Double> function) protected void
modify
(int first, int limit, int step, Access1D<Double> left, BinaryFunction<Double> function) (package private) void
modify
(long extIndex, int intIndex, BinaryFunction<Double> function, Access1D<Double> right) (package private) void
modify
(long extIndex, int intIndex, UnaryFunction<Double> function) (package private) void
modify
(long extIndex, int intIndex, Access1D<Double> left, BinaryFunction<Double> function) protected void
modifyOne
(int index, UnaryFunction<Double> modifier) void
reset()
Reset this mutable structure to some standard (all zeros) initial state.protected int
searchAscending
(Double number) void
set
(int index, double value) void
set
(int index, float value) void
set
(int index, long value) void
set
(int index, short value) protected void
set
(int index, Comparable<?> number) short
shortValue
(int index) void
void
protected void
visit
(int first, int limit, int step, VoidFunction<Double> visitor) protected void
visitOne
(int index, VoidFunction<Double> visitor) static ArrayZ016
wrap
(short... data) Methods inherited from class org.ojalgo.array.PrimitiveArray
wrap, wrap
Methods inherited from class org.ojalgo.array.PlainArray
add, add, add, add, add, add, add, add, add, add, add, byteValue, count, doubleValue, exchange, fill, fill, fillAll, fillAll, fillRange, fillRange, floatValue, get, indexOfLargest, intValue, intValue, longValue, longValue, modify, modify, modify, modifyOne, set, set, set, set, set, set, set, set, set, shortValue, size, visit, visitOne
Methods inherited from class org.ojalgo.array.DenseArray
build
Methods inherited from class org.ojalgo.array.BasicArray
aggregateRange, equals, factory, getMathType, hashCode, 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, fillMatching, fillMatching, fillMatching
Methods inherited from interface org.ojalgo.structure.Structure1D
count, size
-
Field Details
-
FACTORY
-
data
public final short[] data
-
-
Constructor Details
-
ArrayZ016
protected ArrayZ016(int size) -
ArrayZ016
protected ArrayZ016(short[] data) Array not copied! No checking!
-
-
Method Details
-
make
-
wrap
-
byteValue
public byte byteValue(int index) -
doubleValue
public double doubleValue(int index) - Specified by:
doubleValue
in interfaceAccess1D<Double>
- Overrides:
doubleValue
in classPlainArray<Double>
-
floatValue
public float floatValue(int index) - Specified by:
floatValue
in interfaceAccess1D<Double>
- Specified by:
floatValue
in classPlainArray<Double>
-
get
- Specified by:
get
in classPlainArray<Double>
-
reset
public 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 void set(int index, double value) - Specified by:
set
in interfaceMutate1D
- Specified by:
set
in classPlainArray<Double>
-
set
public void set(int index, float value) - Specified by:
set
in interfaceMutate1D
- Overrides:
set
in classPlainArray<Double>
-
set
public void set(int index, long value) - Specified by:
set
in interfaceMutate1D
- Specified by:
set
in classPlainArray<Double>
-
set
public void set(int index, short value) - Specified by:
set
in interfaceMutate1D
- Overrides:
set
in classPlainArray<Double>
-
shortValue
public short shortValue(int index) - Specified by:
shortValue
in interfaceAccess1D<Double>
- Overrides:
shortValue
in classPlainArray<Double>
-
sortAscending
public void sortAscending()- Specified by:
sortAscending
in interfaceMutate1D.Sortable
- Specified by:
sortAscending
in classPlainArray<Double>
-
sortDescending
public void sortDescending()- Specified by:
sortDescending
in interfaceMutate1D.Sortable
- Specified by:
sortDescending
in classPlainArray<Double>
-
add
- Specified by:
add
in classPlainArray<Double>
-
add
protected void add(int index, double addend) - Specified by:
add
in classPlainArray<Double>
-
add
protected void add(int index, short addend) - Overrides:
add
in classPlainArray<Double>
-
exchange
protected void exchange(int firstA, int firstB, int step, int count) - Specified by:
exchange
in classPlainArray<Double>
-
fill
- Specified by:
fill
in classPlainArray<Double>
-
fill
- Specified by:
fill
in classPlainArray<Double>
-
fillOne
- Specified by:
fillOne
in classPlainArray<Double>
-
fillOne
- Specified by:
fillOne
in classPlainArray<Double>
-
fillOne
- Specified by:
fillOne
in classPlainArray<Double>
-
indexOfLargest
protected int indexOfLargest(int first, int limit, int step) - Specified by:
indexOfLargest
in classPlainArray<Double>
-
isAbsolute
protected boolean isAbsolute(int index) - Specified by:
isAbsolute
in classPlainArray<Double>
- See Also:
-
isSmall
protected boolean isSmall(int index, double comparedTo) - Specified by:
isSmall
in classPlainArray<Double>
- See Also:
-
modify
protected void modify(int first, int limit, int step, Access1D<Double> left, BinaryFunction<Double> function) - Specified by:
modify
in classPlainArray<Double>
-
modify
protected void modify(int first, int limit, int step, BinaryFunction<Double> function, Access1D<Double> right) - Specified by:
modify
in classPlainArray<Double>
-
modify
- Specified by:
modify
in classPlainArray<Double>
-
modifyOne
- Specified by:
modifyOne
in classPlainArray<Double>
-
searchAscending
- Specified by:
searchAscending
in classPlainArray<Double>
-
set
- Specified by:
set
in classPlainArray<Double>
-
visit
- Specified by:
visit
in classPlainArray<Double>
-
visitOne
- Specified by:
visitOne
in classPlainArray<Double>
-
modify
- Specified by:
modify
in classDenseArray<Double>
-
modify
- Specified by:
modify
in classDenseArray<Double>
-
modify
- Specified by:
modify
in classDenseArray<Double>
-