Package org.ojalgo.array
Class ArrayR032
- 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
- Direct Known Subclasses:
R032Store
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, float addend) protected void
add
(int index, Comparable<?> addend) void
axpy
(double a, Mutate1D.Modifiable<?> y) Will calculate y = y + a x, will add "a" times "this" to "y"byte
byteValue
(int index) protected final float[]
double
Will calculate and return the dot product of this 1D-structure and another input 1D-vector.final double
doubleValue
(int index) 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<Double> function, Access1D<Double> 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<Double> left, BinaryFunction<Double> function, Access1D<Double> right) protected void
protected void
fillOne
(int index, NullaryFunction<?> supplier) protected void
float
floatValue
(int index) final Double
get
(int index) int
hashCode()
protected final int
indexOfLargest
(int first, int limit, int step) int
intValue
(int index) protected boolean
isAbsolute
(int index) protected boolean
isSmall
(int index, double comparedTo) static ArrayR032
make
(int size) protected final void
modify
(int first, int limit, int step, BinaryFunction<Double> function, Access1D<Double> right) protected final void
modify
(int first, int limit, int step, UnaryFunction<Double> function) protected final 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 final void
modifyOne
(int index, UnaryFunction<Double> modifier) final void
reset()
Reset this mutable structure to some standard (all zeros) initial state.protected final int
searchAscending
(Double number) final void
set
(int index, double value) final void
set
(int index, float value) void
set
(int index, long value) protected final void
set
(int index, Comparable<?> value) short
shortValue
(int index) void
void
void
protected final void
visit
(int first, int limit, int step, VoidFunction<Double> visitor) protected void
visitOne
(int index, VoidFunction<Double> visitor) static ArrayR032
wrap
(float... data) Methods inherited from class org.ojalgo.array.PrimitiveArray
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, longValue, longValue, modify, modify, modify, modifyOne, set, 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, factory, getMathType, indexOfLargest, isPrimitive, modifyAll, modifyMatching, modifyMatching, modifyRange, 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, 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.Structure1D
count, size
-
Field Details
-
FACTORY
-
data
public final float[] data
-
-
Constructor Details
-
ArrayR032
protected ArrayR032(float[] data) Array not copied! No checking! -
ArrayR032
protected ArrayR032(int size)
-
-
Method Details
-
make
-
wrap
-
axpy
Description copied from interface:Access1D
Will calculate y = y + a x, will add "a" times "this" to "y"- Parameters:
a
- The scaley
- The "vector" to update
-
byteValue
public byte byteValue(int index) -
dot
Description copied from interface:Access1D
Will calculate and return the dot product of this 1D-structure and another input 1D-vector.- Parameters:
vector
- Another 1D-structure- Returns:
- The dot product
-
doubleValue
public final double doubleValue(int index) - Specified by:
doubleValue
in interfaceAccess1D<Double>
- Overrides:
doubleValue
in classPlainArray<Double>
-
equals
- Overrides:
equals
in classBasicArray<Double>
-
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)
-
fillMatching
-
fillMatching
-
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>
-
hashCode
public int hashCode()- Overrides:
hashCode
in classBasicArray<Double>
-
intValue
public int intValue(int index) -
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<Double>
-
set
public final 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>
-
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>
-
supplyTo
- Specified by:
supplyTo
in interfaceAccess1D.Collectable<Double,
Mutate1D> - Overrides:
supplyTo
in classBasicArray<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, float addend) - Overrides:
add
in classPlainArray<Double>
-
copyOfData
protected final float[] copyOfData() -
exchange
protected final 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 final 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 final void modify(int first, int limit, int step, Access1D<Double> left, BinaryFunction<Double> function) - Specified by:
modify
in classPlainArray<Double>
-
modify
protected final 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>
-