public abstract class BasicArray<N extends Number> extends Object implements Access1D<N>, Access1D.Elements, Access1D.IndexOf, Access1D.Visitable<N>, Mutate1D, Mutate1D.Fillable<N>, Mutate1D.Modifiable<N>
A BasicArray is 1-dimensional, but designed to easily be extended or encapsulated, and then treated as arbitrary-dimensional. It stores/handles (any subclass of) Number elements depending on the subclass/implementation.
This abstract class defines a set of methods to access and modify array elements. It does not "know" anything about linear algebra or similar.
Modifier and Type | Class and Description |
---|---|
static class |
BasicArray.Factory<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 | Constructor and Description |
---|---|
protected |
BasicArray(org.ojalgo.array.ArrayFactory<N,?> factory) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
exchange(long firstA,
long firstB,
long step,
long count) |
protected abstract void |
fill(long first,
long limit,
long step,
N value) |
protected abstract void |
fill(long first,
long limit,
long step,
NullaryFunction<N> supplier) |
long |
indexOfLargest() |
protected long |
indexOfLargest(long first,
long limit,
long step) |
long |
indexOfLargestInRange(long first,
long limit) |
protected abstract boolean |
isSmall(long first,
long limit,
long step,
double comparedTo) |
static int[] |
makeDecreasingRange(int first,
int count) |
static long[] |
makeDecreasingRange(long first,
int count) |
static int[] |
makeIncreasingRange(int first,
int count) |
static long[] |
makeIncreasingRange(long first,
int count) |
protected abstract void |
modify(long first,
long limit,
long step,
Access1D<N> left,
BinaryFunction<N> function) |
protected abstract void |
modify(long first,
long limit,
long step,
BinaryFunction<N> function,
Access1D<N> right) |
protected abstract void |
modify(long first,
long limit,
long step,
UnaryFunction<N> function) |
void |
modifyAll(UnaryFunction<N> modifier) |
void |
modifyMatching(Access1D<N> left,
BinaryFunction<N> function) |
void |
modifyMatching(BinaryFunction<N> function,
Access1D<N> right) |
void |
modifyRange(long first,
long limit,
UnaryFunction<N> modifier) |
String |
toString() |
protected abstract void |
visit(long first,
long limit,
long step,
VoidFunction<N> visitor) |
void |
visitAll(VoidFunction<N> visitor) |
void |
visitRange(long first,
long limit,
VoidFunction<N> visitor) |
protected Array1D<N> |
wrapInArray1D()
A utility facade that conveniently/consistently presents the BasicArray
as a one-dimensional array.
|
protected Array2D<N> |
wrapInArray2D(long structure)
A utility facade that conveniently/consistently presents the BasicArray
as a two-dimensional array.
|
protected ArrayAnyD<N> |
wrapInArrayAnyD(long[] structure)
A utility facade that conveniently/consistently presents the BasicArray
as a multi-dimensional array.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
asCollectable1D, asPrimitive1D, axpy, byteValue, dot, doubleValue, elements, equals, floatValue, get, hashCode, intValue, longValue, nonzeros, shortValue, supplyTo, toRawCopy1D, toString, wrap, wrap, wrap
isAbsolute, isAllSmall, isSmall
visitOne
add, add, copyComplexArgument, copyComplexImaginary, copyComplexModulus, copyComplexModulusAndArgument, copyComplexReal, copyComplexRealAndImaginary, reset, set, set
fillAll, fillAll, fillMatching, fillMatching, fillMatching, fillOne, fillOne, fillOne, fillRange, fillRange
modifyOne
count, index, loopAll, loopMatching, loopRange, mapper, size
protected BasicArray(org.ojalgo.array.ArrayFactory<N,?> factory)
public static int[] makeDecreasingRange(int first, int count)
public static long[] makeDecreasingRange(long first, int count)
public static int[] makeIncreasingRange(int first, int count)
public static long[] makeIncreasingRange(long first, int count)
public long indexOfLargest()
indexOfLargest
in interface Access1D.IndexOf
public long indexOfLargestInRange(long first, long limit)
indexOfLargestInRange
in interface Access1D.IndexOf
public void modifyAll(UnaryFunction<N> modifier)
modifyAll
in interface Mutate1D.Modifiable<N extends Number>
public void modifyMatching(Access1D<N> left, BinaryFunction<N> function)
modifyMatching
in interface Mutate1D.Modifiable<N extends Number>
public void modifyMatching(BinaryFunction<N> function, Access1D<N> right)
modifyMatching
in interface Mutate1D.Modifiable<N extends Number>
public void modifyRange(long first, long limit, UnaryFunction<N> modifier)
modifyRange
in interface Mutate1D.Modifiable<N extends Number>
public void visitAll(VoidFunction<N> visitor)
visitAll
in interface Access1D.Visitable<N extends Number>
public void visitRange(long first, long limit, VoidFunction<N> visitor)
visitRange
in interface Access1D.Visitable<N extends Number>
protected abstract void exchange(long firstA, long firstB, long step, long count)
protected abstract void fill(long first, long limit, long step, N value)
protected abstract void fill(long first, long limit, long step, NullaryFunction<N> supplier)
protected long indexOfLargest(long first, long limit, long step)
protected abstract boolean isSmall(long first, long limit, long step, double comparedTo)
protected abstract void modify(long first, long limit, long step, Access1D<N> left, BinaryFunction<N> function)
protected abstract void modify(long first, long limit, long step, BinaryFunction<N> function, Access1D<N> right)
protected abstract void modify(long first, long limit, long step, UnaryFunction<N> function)
protected abstract void visit(long first, long limit, long step, VoidFunction<N> visitor)
protected final Array1D<N> wrapInArray1D()
protected final Array2D<N> wrapInArray2D(long structure)
protected final ArrayAnyD<N> wrapInArrayAnyD(long[] structure)
Copyright © 2019 Optimatika. All rights reserved.