public final class Array2D<N extends Number> extends Object implements Access2D<N>, Access2D.Visitable<N>, Access2D.Aggregatable<N>, Access2D.Sliceable<N>, Access2D.Elements, Access2D.IndexOf, Structure2D.ReducibleTo1D<Array1D<N>>, Mutate2D.ModifiableReceiver<N>, Mutate2D.Mixable<N>
Modifier and Type | Class and Description |
---|---|
static class |
Array2D.Factory<N extends Number> |
Access2D.Aggregatable<N extends Number>, Access2D.Collectable<N extends Number,R extends Mutate2D.Receiver<N>>, Access2D.Elements, Access2D.ElementView<N extends Number>, Access2D.IndexOf, Access2D.Sliceable<N extends Number>, Access2D.Visitable<N extends Number>
Mutate2D.Exchangeable, Mutate2D.Fillable<N extends Number>, Mutate2D.Mixable<N extends Number>, Mutate2D.Modifiable<N extends Number>, Mutate2D.ModifiableReceiver<N extends Number>, Mutate2D.Receiver<N extends Number>
Mutate1D.Sortable
Structure2D.IntRowColumn, Structure2D.Logical<S extends Structure2D,B extends Structure2D.Logical<S,?>>, Structure2D.LongRowColumn, Structure2D.ReducibleTo1D<R extends Structure1D>, Structure2D.RowColumnCallback, Structure2D.RowColumnKey<R,C>, Structure2D.RowColumnMapper<R,C>
Structure1D.BasicMapper<T>, Structure1D.IndexCallback, Structure1D.IndexMapper<T>, Structure1D.IntIndex, Structure1D.LongIndex, Structure1D.LoopCallback
Modifier and Type | Field and Description |
---|---|
static Array2D.Factory<BigDecimal> |
BIG |
static Array2D.Factory<ComplexNumber> |
COMPLEX |
static Array2D.Factory<Double> |
DIRECT32 |
static Array2D.Factory<Double> |
DIRECT64 |
static Array2D.Factory<Double> |
PRIMITIVE32 |
static Array2D.Factory<Double> |
PRIMITIVE64 |
static Array2D.Factory<Quaternion> |
QUATERNION |
static Array2D.Factory<RationalNumber> |
RATIONAL |
Modifier and Type | Method and Description |
---|---|
void |
add(long index,
double addend) |
void |
add(long row,
long col,
double addend) |
void |
add(long row,
long col,
Number addend) |
void |
add(long index,
Number addend) |
N |
aggregateColumn(long row,
long col,
Aggregator aggregator) |
N |
aggregateDiagonal(long row,
long col,
Aggregator aggregator) |
N |
aggregateRange(long first,
long limit,
Aggregator aggregator) |
N |
aggregateRow(long row,
long col,
Aggregator aggregator) |
Array1D<N> |
asArray1D()
Deprecated.
v39 Not needed
|
void |
clear() |
long |
count()
count() == countRows() * countColumns()
|
long |
countColumns() |
long |
countRows() |
double |
doubleValue(long index) |
double |
doubleValue(long row,
long col)
Extracts one element of this matrix as a double.
|
boolean |
equals(Object obj) |
void |
exchangeColumns(long colA,
long colB) |
void |
exchangeRows(long rowA,
long rowB) |
static <N extends Number> |
factory(DenseArray.Factory<N> denseArray) |
void |
fillAll(N value) |
void |
fillAll(NullaryFunction<N> supplier) |
void |
fillColumn(long row,
long col,
Access1D<N> values) |
void |
fillColumn(long row,
long col,
N value) |
void |
fillColumn(long row,
long col,
NullaryFunction<N> supplier) |
void |
fillDiagonal(long row,
long col,
N value) |
void |
fillDiagonal(long row,
long col,
NullaryFunction<N> supplier) |
void |
fillOne(long index,
Access1D<?> values,
long valueIndex) |
void |
fillOne(long row,
long col,
Access1D<?> values,
long valueIndex) |
void |
fillOne(long row,
long col,
N value) |
void |
fillOne(long row,
long col,
NullaryFunction<N> supplier) |
void |
fillOne(long index,
N value) |
void |
fillOne(long index,
NullaryFunction<N> supplier) |
void |
fillRange(long first,
long limit,
N value) |
void |
fillRange(long first,
long limit,
NullaryFunction<N> supplier) |
void |
fillRow(long row,
long col,
Access1D<N> values) |
void |
fillRow(long row,
long col,
N value) |
void |
fillRow(long row,
long col,
NullaryFunction<N> supplier) |
N |
get(long index) |
N |
get(long row,
long col) |
int |
hashCode() |
long |
indexOfLargest() |
long |
indexOfLargestInColumn(long row,
long col) |
long |
indexOfLargestInRange(long first,
long limit) |
long |
indexOfLargestInRow(long row,
long col) |
long |
indexOfLargestOnDiagonal(long first) |
boolean |
isAbsolute(long index) |
boolean |
isAbsolute(long row,
long col) |
boolean |
isAllSmall(double comparedTo) |
boolean |
isColumnSmall(long row,
long col,
double comparedTo) |
boolean |
isRowSmall(long row,
long col,
double comparedTo) |
boolean |
isSmall(long index,
double comparedTo) |
boolean |
isSmall(long row,
long col,
double comparedTo) |
double |
mix(long row,
long col,
BinaryFunction<N> mixer,
double addend) |
N |
mix(long row,
long col,
BinaryFunction<N> mixer,
N addend) |
void |
modifyAll(UnaryFunction<N> modifier) |
void |
modifyAny(Transformation2D<N> modifier) |
void |
modifyColumn(long row,
long col,
UnaryFunction<N> modifier) |
void |
modifyDiagonal(long row,
long col,
UnaryFunction<N> modifier) |
void |
modifyMatching(Access1D<N> left,
BinaryFunction<N> function) |
void |
modifyMatching(BinaryFunction<N> function,
Access1D<N> right) |
void |
modifyOne(long row,
long col,
UnaryFunction<N> modifier) |
void |
modifyOne(long index,
UnaryFunction<N> modifier) |
void |
modifyRange(long first,
long limit,
UnaryFunction<N> modifier) |
void |
modifyRow(long row,
long col,
UnaryFunction<N> modifier) |
Array1D<N> |
reduceColumns(Aggregator aggregator) |
Array1D<N> |
reduceRows(Aggregator aggregator) |
void |
set(long index,
double value) |
void |
set(long row,
long col,
double value) |
void |
set(long row,
long col,
Number value) |
void |
set(long index,
Number value) |
Array1D<N> |
sliceColumn(long col) |
Array1D<N> |
sliceColumn(long row,
long col) |
Array1D<N> |
sliceDiagonal(long row,
long col) |
Array1D<N> |
sliceRange(long first,
long limit) |
Array1D<N> |
sliceRow(long row) |
Array1D<N> |
sliceRow(long row,
long col) |
String |
toString() |
void |
visitAll(VoidFunction<N> visitor) |
void |
visitColumn(long row,
long col,
VoidFunction<N> visitor) |
void |
visitDiagonal(long row,
long col,
VoidFunction<N> visitor) |
void |
visitOne(long row,
long col,
VoidFunction<N> visitor) |
void |
visitOne(long index,
VoidFunction<N> visitor) |
void |
visitRange(long first,
long limit,
VoidFunction<N> visitor) |
void |
visitRow(long row,
long col,
VoidFunction<N> visitor) |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
asCollectable2D, asPrimitive2D, byteValue, byteValue, columns, elements, equals, floatValue, floatValue, intValue, intValue, longValue, longValue, newPrimitiveColumnCollectable, newPrimitiveRowCollectable, rows, shortValue, shortValue, toRawCopy2D, toString, wrap, wrap
asCollectable1D, asPrimitive1D, axpy, dot, equals, hashCode, nonzeros, supplyTo, toRawCopy1D, toString, wrap, wrap, wrap
visitColumn, visitDiagonal, visitRow
aggregateColumn, aggregateDiagonal, aggregateRow, reduceColumns, reduceRows
aggregateAll
sliceDiagonal
isColumnSmall, isRowSmall
indexOfLargestInColumn, indexOfLargestInRow, indexOfLargestOnDiagonal
modifyColumn, modifyDiagonal, modifyMatchingInColumns, modifyMatchingInColumns, modifyMatchingInRows, modifyMatchingInRows, modifyRow
accept, isAcceptable
copyComplexArgument, copyComplexImaginary, copyComplexModulus, copyComplexModulusAndArgument, copyComplexReal, copyComplexRealAndImaginary, reset
fillColumn, fillColumn, fillColumn, fillDiagonal, fillDiagonal, fillDiagonal, fillDiagonal, fillRow, fillRow, fillRow
column, column, column, column, column, count, index, index, isEmpty, isFat, isScalar, isSquare, isTall, isVector, loopAll, loopColumn, loopColumn, loopDiagonal, loopMatching, loopRow, loopRow, mapperOf, row, row, row, row, row
fillMatching, fillMatching, fillMatching
index, loopAll, loopMatching, loopRange, mapper, size
mix, mix
public static final Array2D.Factory<BigDecimal> BIG
public static final Array2D.Factory<ComplexNumber> COMPLEX
public static final Array2D.Factory<Double> DIRECT32
public static final Array2D.Factory<Double> DIRECT64
public static final Array2D.Factory<Double> PRIMITIVE32
public static final Array2D.Factory<Double> PRIMITIVE64
public static final Array2D.Factory<Quaternion> QUATERNION
public static final Array2D.Factory<RationalNumber> RATIONAL
public static <N extends Number> Array2D.Factory<N> factory(DenseArray.Factory<N> denseArray)
public void add(long index, double addend)
public void add(long index, Number addend)
public N aggregateColumn(long row, long col, Aggregator aggregator)
aggregateColumn
in interface Access2D.Aggregatable<N extends Number>
public N aggregateDiagonal(long row, long col, Aggregator aggregator)
aggregateDiagonal
in interface Access2D.Aggregatable<N extends Number>
public N aggregateRange(long first, long limit, Aggregator aggregator)
aggregateRange
in interface Access1D.Aggregatable<N extends Number>
public N aggregateRow(long row, long col, Aggregator aggregator)
aggregateRow
in interface Access2D.Aggregatable<N extends Number>
@Deprecated public Array1D<N> asArray1D()
public void clear()
public long count()
Structure2D
count
in interface Structure1D
count
in interface Structure2D
public long countColumns()
countColumns
in interface Structure2D
public long countRows()
countRows
in interface Structure2D
public double doubleValue(long index)
doubleValue
in interface Access1D<N extends Number>
doubleValue
in interface Access2D<N extends Number>
public double doubleValue(long row, long col)
Access2D
doubleValue
in interface Access2D<N extends Number>
row
- A row index.col
- A column index.public void exchangeColumns(long colA, long colB)
exchangeColumns
in interface Mutate2D.Exchangeable
public void exchangeRows(long rowA, long rowB)
exchangeRows
in interface Mutate2D.Exchangeable
public void fillAll(N value)
fillAll
in interface Mutate1D.Fillable<N extends Number>
public void fillAll(NullaryFunction<N> supplier)
fillAll
in interface Mutate1D.Fillable<N extends Number>
public void fillColumn(long row, long col, Access1D<N> values)
fillColumn
in interface Mutate2D.Fillable<N extends Number>
public void fillColumn(long row, long col, N value)
fillColumn
in interface Mutate2D.Fillable<N extends Number>
public void fillColumn(long row, long col, NullaryFunction<N> supplier)
fillColumn
in interface Mutate2D.Fillable<N extends Number>
public void fillDiagonal(long row, long col, N value)
fillDiagonal
in interface Mutate2D.Fillable<N extends Number>
public void fillDiagonal(long row, long col, NullaryFunction<N> supplier)
fillDiagonal
in interface Mutate2D.Fillable<N extends Number>
public void fillOne(long index, Access1D<?> values, long valueIndex)
fillOne
in interface Mutate1D.Fillable<N extends Number>
fillOne
in interface Mutate2D.Fillable<N extends Number>
public void fillOne(long row, long col, Access1D<?> values, long valueIndex)
fillOne
in interface Mutate2D.Fillable<N extends Number>
public void fillOne(long row, long col, N value)
fillOne
in interface Mutate2D.Fillable<N extends Number>
public void fillOne(long row, long col, NullaryFunction<N> supplier)
fillOne
in interface Mutate2D.Fillable<N extends Number>
public void fillOne(long index, N value)
fillOne
in interface Mutate1D.Fillable<N extends Number>
fillOne
in interface Mutate2D.Fillable<N extends Number>
public void fillOne(long index, NullaryFunction<N> supplier)
fillOne
in interface Mutate1D.Fillable<N extends Number>
fillOne
in interface Mutate2D.Fillable<N extends Number>
public void fillRange(long first, long limit, N value)
fillRange
in interface Mutate1D.Fillable<N extends Number>
public void fillRange(long first, long limit, NullaryFunction<N> supplier)
fillRange
in interface Mutate1D.Fillable<N extends Number>
public void fillRow(long row, long col, Access1D<N> values)
fillRow
in interface Mutate2D.Fillable<N extends Number>
public void fillRow(long row, long col, N value)
fillRow
in interface Mutate2D.Fillable<N extends Number>
public void fillRow(long row, long col, NullaryFunction<N> supplier)
fillRow
in interface Mutate2D.Fillable<N extends Number>
public N get(long index)
public long indexOfLargest()
indexOfLargest
in interface Access1D.IndexOf
public long indexOfLargestInColumn(long row, long col)
indexOfLargestInColumn
in interface Access2D.IndexOf
row
- First row to investigatecol
- The columnpublic long indexOfLargestInRange(long first, long limit)
indexOfLargestInRange
in interface Access1D.IndexOf
public long indexOfLargestInRow(long row, long col)
indexOfLargestInRow
in interface Access2D.IndexOf
row
- The rowcol
- The first column to investigatepublic long indexOfLargestOnDiagonal(long first)
indexOfLargestOnDiagonal
in interface Access2D.IndexOf
first
- The first row/column to investigatepublic boolean isAbsolute(long index)
isAbsolute
in interface Access1D.Elements
isAbsolute
in interface Access2D.Elements
Scalar.isAbsolute()
public boolean isAbsolute(long row, long col)
isAbsolute
in interface Access2D.Elements
Scalar.isAbsolute()
public boolean isAllSmall(double comparedTo)
isAllSmall
in interface Access1D.Elements
NormedVectorSpace.isSmall(double)
public boolean isColumnSmall(long row, long col, double comparedTo)
isColumnSmall
in interface Access2D.Elements
NormedVectorSpace.isSmall(double)
public boolean isRowSmall(long row, long col, double comparedTo)
isRowSmall
in interface Access2D.Elements
NormedVectorSpace.isSmall(double)
public boolean isSmall(long index, double comparedTo)
isSmall
in interface Access1D.Elements
isSmall
in interface Access2D.Elements
NormedVectorSpace.isSmall(double)
public boolean isSmall(long row, long col, double comparedTo)
isSmall
in interface Access2D.Elements
NormedVectorSpace.isSmall(double)
public double mix(long row, long col, BinaryFunction<N> mixer, double addend)
mix
in interface Mutate2D.Mixable<N extends Number>
public N mix(long row, long col, BinaryFunction<N> mixer, N addend)
mix
in interface Mutate2D.Mixable<N extends Number>
public void modifyAll(UnaryFunction<N> modifier)
modifyAll
in interface Mutate1D.Modifiable<N extends Number>
public void modifyAny(Transformation2D<N> modifier)
modifyAny
in interface Mutate2D.ModifiableReceiver<N extends Number>
public void modifyColumn(long row, long col, UnaryFunction<N> modifier)
modifyColumn
in interface Mutate2D.Modifiable<N extends Number>
public void modifyDiagonal(long row, long col, UnaryFunction<N> modifier)
modifyDiagonal
in interface Mutate2D.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 modifyOne(long row, long col, UnaryFunction<N> modifier)
modifyOne
in interface Mutate2D.Modifiable<N extends Number>
public void modifyOne(long index, UnaryFunction<N> modifier)
modifyOne
in interface Mutate1D.Modifiable<N extends Number>
modifyOne
in interface Mutate2D.Modifiable<N extends Number>
public void modifyRange(long first, long limit, UnaryFunction<N> modifier)
modifyRange
in interface Mutate1D.Modifiable<N extends Number>
public void modifyRow(long row, long col, UnaryFunction<N> modifier)
modifyRow
in interface Mutate2D.Modifiable<N extends Number>
public Array1D<N> reduceColumns(Aggregator aggregator)
reduceColumns
in interface Structure2D.ReducibleTo1D<Array1D<N extends Number>>
public Array1D<N> reduceRows(Aggregator aggregator)
reduceRows
in interface Structure2D.ReducibleTo1D<Array1D<N extends Number>>
public void set(long index, double value)
public void set(long index, Number value)
public Array1D<N> sliceColumn(long col)
sliceColumn
in interface Access2D.Sliceable<N extends Number>
public Array1D<N> sliceColumn(long row, long col)
sliceColumn
in interface Access2D.Sliceable<N extends Number>
public Array1D<N> sliceDiagonal(long row, long col)
sliceDiagonal
in interface Access2D.Sliceable<N extends Number>
public Array1D<N> sliceRange(long first, long limit)
sliceRange
in interface Access1D.Sliceable<N extends Number>
public Array1D<N> sliceRow(long row)
sliceRow
in interface Access2D.Sliceable<N extends Number>
public Array1D<N> sliceRow(long row, long col)
sliceRow
in interface Access2D.Sliceable<N extends Number>
public void visitAll(VoidFunction<N> visitor)
visitAll
in interface Access1D.Visitable<N extends Number>
public void visitColumn(long row, long col, VoidFunction<N> visitor)
visitColumn
in interface Access2D.Visitable<N extends Number>
public void visitDiagonal(long row, long col, VoidFunction<N> visitor)
visitDiagonal
in interface Access2D.Visitable<N extends Number>
public void visitOne(long row, long col, VoidFunction<N> visitor)
visitOne
in interface Access2D.Visitable<N extends Number>
public void visitOne(long index, VoidFunction<N> visitor)
visitOne
in interface Access1D.Visitable<N extends Number>
visitOne
in interface Access2D.Visitable<N extends Number>
public void visitRange(long first, long limit, VoidFunction<N> visitor)
visitRange
in interface Access1D.Visitable<N extends Number>
public void visitRow(long row, long col, VoidFunction<N> visitor)
visitRow
in interface Access2D.Visitable<N extends Number>
Copyright © 2019 Optimatika. All rights reserved.