public abstract class AMatrix extends AbstractArray<AVector> implements IMatrix
| Constructor and Description |
|---|
AMatrix() |
| Modifier and Type | Method and Description |
|---|---|
void |
abs()
Replaces all elements of this array with their absolute values, according to Math.abs(double)
|
void |
add(AMatrix m)
Adds another matrix to this matrix.
|
void |
add(AVector v)
Adds a vector to every row of this matrix.
|
void |
add(double d)
Adds a double value to all elements in this array.
|
void |
add(INDArray a)
Adds all the elements of another array to this array, in an elementwise order.
|
void |
add2(AMatrix a,
AMatrix b)
Adds two matrices to this matrix.
|
void |
addAt(int i,
int j,
double d)
Adds a value at a specific position in the matrix, mutating the matrix
Does not perform bounds checking - this in an unsafe operation
|
AMatrix |
addCopy(AMatrix a)
Adds another matrix to this matrix, returning a new matrix
|
Matrix |
addCopy(AStridedMatrix a)
Adds a dense matrix to this matrix, returning a new dense Matrix
|
AMatrix |
addCopy(AVector v)
Adds a vector to every row of this matrix, returning a new matrix
|
AMatrix |
addCopy(double d)
Creates a new array equal to this array with a constant value added to every element
|
INDArray |
addCopy(INDArray a)
Creates a new array equal to the sum of this array with another array.
|
void |
addInnerProduct(AMatrix a,
AMatrix b)
Adds the inner product (matrix multiply) of two matrices to this matrix
|
void |
addInnerProduct(AMatrix a,
INDArray b)
Adds the inner product of a matrix and an array to this array
|
void |
addInnerProduct(INDArray a,
INDArray b)
Adds the inner product of two arrays to this array.
|
void |
addMultiple(AMatrix m,
double factor)
Adds a scalar multiple of another matrix to this matrix
|
void |
addMultiple(AVector v,
double factor)
Adds a scalar multiple of a vector to every row of this matrix
|
void |
addMultiple(INDArray src,
double factor)
Adds a scaled multiple of another array to this array
|
void |
addOuterProduct(AVector a,
AVector b)
Adds the outer product of two vectors to this matrix
|
void |
addOuterProduct(INDArray a,
INDArray b)
Adds the outer product of two arrays to this array.
|
void |
addRowMultiple(int src,
int dst,
double factor)
Adds a multiple of a source row to a destination row
This is an elementary row operation
|
void |
addToArray(double[] data,
int offset)
Adds all the elements of this array to a double array, in row-major order
|
void |
applyOp(IOperator op)
Applies a unary operator to all elements of the array (in-place)
|
void |
applyOp(Op op)
Applies a unary operator to all elements of the array (in-place)
|
void |
applyOp(Op2 op,
AMatrix b) |
void |
applyOp(Op2 op,
AVector b) |
void |
applyOp(Op2 op,
double b)
Applies a binary operator to this array and a double value.
|
void |
applyOp(Op2 op,
INDArray b)
Applies a binary operator to this array and a second array.
|
AMatrix |
applyOpCopy(Op op)
Applies a unary operator to all elements of the array (creating a new array)
|
double[] |
asDoubleArray()
Returns the underlying double array representing the densely packed elements of this array
Returns null if there is no such array
|
List<Double> |
asElementList()
Returns a List
|
AVector |
asVector()
Returns the matrix values as a single reference Vector in the form [row0
row1 row2....]
|
int |
bandIndex(int i,
int j)
Returns the band index number for a specified position in the matrix.
|
int |
bandLength(int band)
Returns the length of a band of the matrix.
|
protected static int |
bandLength(int rc,
int cc,
int band) |
int |
bandPosition(int i,
int j)
Returns the band position for a specified (i,j) index in the matrix.
|
int |
bandStartColumn(int band)
Returns the start column of a given band.
|
int |
bandStartRow(int band)
Returns the start row of a given band.
|
INDArray |
broadcast(int... targetShape)
Returns a view of this array broadcasted up to a larger shape
|
INDArray |
broadcastCloneLike(INDArray target)
Creates a mutable clone of the array, broadcasted upwards if necessary to match the shape of the target.
|
INDArray |
broadcastCopyLike(INDArray target)
Creates a copy of the array, broadcasted upwards if necessary to match the shape of the target
Like broadCastCloneLike, but does not guarantee a mutable clone - hence may be faster
when used with immutable or specialized arrays
|
AMatrix |
broadcastLike(AMatrix target)
Broadcasts an array to match the shape of the target matrix
|
INDArray |
broadcastLike(INDArray target)
Broadcasts an array to match the shape of the target
|
int |
checkColumn(int column)
Checks if the given column index is valid for this matrix.
|
protected int |
checkColumnCount(int expected)
Checks if this matrix has the expected number of columns.
|
protected void |
checkDimension(int dimension)
Checks if an array has the specified dimension.
|
protected void |
checkIndex(int i,
int j)
Checks if the given index is valid for this matrix.
|
int |
checkRow(int row)
Checks if the given rows index is valid for this matrix.
|
protected int |
checkRowCount(int expected)
Checks if this matrix has the expected number of rows.
|
protected void |
checkSameShape(AMatrix m)
Checks if this matrix has the same shape as another matrix.
|
protected void |
checkSameShape(ARectangularMatrix m)
Checks if this matrix has the same shape as another matrix.
|
protected void |
checkShape(int rows,
int cols)
Checks if this matrix has the specified shape.
|
int |
checkSquare()
Checks if a matrix is square.
|
void |
clamp(double min,
double max)
Clamps all the elements of this array within the specified [min,max] range
|
AMatrix |
clone()
Returns a clone of the array data, as a new array which will be fully mutable
and may be of a different class to the original.
|
void |
composeWith(AMatrix a) |
AMatrix |
copy()
Returns a defensive copy of the array data.
|
void |
copyColumnTo(int j,
double[] dest,
int destOffset)
Copies the elements in a selected row of this matrix to a double array
|
void |
copyRowTo(int i,
double[] dest,
int destOffset)
Copies the elements in a slected row of this matrix to a double array
|
AMatrix |
dense()
Coerces this INDArray to a dense format, without changing its element values.
|
Matrix |
denseClone()
Creates a fully mutable dense clone of this array.
|
double |
determinant()
Calculates the determinant of the matrix.
|
double |
diagonalProduct()
Computes the product of entries on the main diagonal of a matrix
|
int |
dimensionality()
Returns the dimensionality of the array (i.e.
|
void |
divide(AMatrix m)
Divides this matrix in-place by another in an entrywise manner.
|
void |
divide(AVector v)
Divides every row of this matrix by the given vector
|
void |
divide(double factor)
Divides all elements by a given factor
|
void |
divide(INDArray a)
Divides all elements in place by the equivalent elements in a second array
|
long |
elementCount()
Returns the total number of elements in this array.
|
Iterator<Double> |
elementIterator()
Returns an iterator over all elements in this array, in row-major order
|
boolean |
elementsEqual(double value)
Returns true if all elements are equal to a specific value
|
double |
elementSquaredSum()
Returns the squared sum of all elements in this matrix
|
double |
elementSum()
Returns the sum of all elements in this matrix
|
AMatrix |
ensureMutable()
Ensures the array is a fully mutable, efficient representation that is not
a view.
|
boolean |
epsilonEquals(AMatrix a)
Returns true if this matrix is approximately equal to
a second matrix, up to a default tolerance level
|
boolean |
epsilonEquals(AMatrix a,
double epsilon) |
boolean |
epsilonEquals(INDArray a)
Tests if this array is approximately equal to another array.
|
boolean |
epsilonEquals(INDArray a,
double epsilon)
Tests is this array is approximately equal to another array, up to a given tolerance (epsilon)
The arrays must have the same shape
|
boolean |
equals(AMatrix a)
Returns true if this matrix is exactly equal to another matrix
|
boolean |
equals(INDArray v)
Checks if two arrays are equal exactly in terms of both value and shape
|
boolean |
equals(Object o) |
boolean |
equalsArray(double[] data,
int offset)
Returns true if the elements in this array exactly match the elements in the given array, in
row-major order
|
protected boolean |
equalsByRows(AMatrix m)
Internal method to test for equality in a row-wise basis.
|
boolean |
equalsTranspose(AMatrix a)
Tests if this matrix is exactly equal to the transpose of another matrix
|
abstract AMatrix |
exactClone()
Creates a deep clone of an array, using the same class implementation as the original array
|
void |
exp()
Computes the function e^x (in-place) for all array elements
|
void |
fill(double value)
Fills this array with a single double value.
|
double |
get()
Returns the double value of a scalar array
|
double |
get(int... indexes)
Returns the double value at the specified index position in an array
|
double |
get(int row)
Returns the double value at the specified position in a 1D vector
|
abstract double |
get(int i,
int j)
Returns the double value at the specified position in a 2D matrix
|
AVector |
getBand(int band)
Gets a specific band of the matrix, as a view vector.
|
AVector |
getBandWrapped(int band) |
AVector |
getColumn(int column)
Returns a column of the matrix.
|
AVector |
getColumnClone(int column)
Returns a column of the matrix as a new cloned, mutable vector
The cloned column may be modified without affecting the original matrix.
|
List<AVector> |
getColumns()
Gets a List of columns of a matrix.
|
AVector |
getColumnView(int column)
Returns a column of the matrix as a vector view.
|
void |
getElements(double[] dest,
int offset)
Gets all elements of the array, copying them into a double array at the specified offset
|
AVector |
getLeadingDiagonal()
Returns a vector view of the leading diagonal values of the matrix
|
long[] |
getLongShape()
Returns the shape of the array as an array of longs.
|
AVector |
getRow(int row)
Returns a row of the matrix.
|
AVector |
getRowClone(int row)
Returns a row of the matrix as a new cloned, mutable vector.
|
List<AVector> |
getRows()
Gets a List of rows of a matrix.
|
AVector |
getRowView(int row)
Returns a row of the matrix as a vector view.
|
int[] |
getShape()
Returns the shape of the array as an array of ints.
|
int |
getShape(int dim)
Returns the dimension size for a specific dimension in the array's shape
|
int[] |
getShapeClone()
Returns the shape of the array as an array of ints, guaranteed to be a new array
i.e.
|
List<AVector> |
getSlices()
Returns a list of all major slices of this array.
|
List<AVector> |
getSlices(int dimension)
Returns a list of all slices of this array along a given dimension.
|
List<INDArray> |
getSliceViews()
Returns a list of slices as mutable INDArray views.
|
AMatrix |
getTranspose()
Returns the transpose of this array.
|
AMatrix |
getTransposeCopy()
Gets a mutable transposed clone of the matrix
|
AMatrix |
getTransposeView()
Returns a transposed view of the array.
|
int |
hashCode() |
boolean |
hasOrthonormalColumns()
Tests whether all columns in the matrix are orthonormal vectors
|
boolean |
hasOrthonormalRows()
Tests whether all rows in the matrix are orthonormal vectors
|
boolean |
hasUncountable()
Checks to see if any element in the matrix is NaN of Infinite.
|
INDArray |
immutable()
Returns an immutable version of this array.
|
AMatrix |
innerProduct(AMatrix a)
Computes the inner product of this matrix with another.
|
AMatrix |
innerProduct(AScalar s)
Calculates the inner product of this array with a scalar
|
AVector |
innerProduct(AVector v)
Computes the inner product of this array with a vector
|
AMatrix |
innerProduct(double d)
Calculates the inner product of this array with a double value
|
INDArray |
innerProduct(INDArray a)
Calculates the inner product of this array with another array.
|
Vector |
innerProduct(Vector v)
Transforms a dense source Vector using matrix multiplication (inner product).
|
int |
inputDimensions()
Returns the number of dimensions required for input vectors
|
AMatrix |
inverse()
Computes the inverse of a matrix.
|
boolean |
isBoolean()
Returns true if the array is boolean (contains only 0.0 or 1.0 values)
|
boolean |
isDiagonal()
Returns true iff this matrix is a square diagonal matrix
|
boolean |
isElementConstrained()
Returns true if this array has some constraints on element values
|
abstract boolean |
isFullyMutable()
If this method returns true, the INDArray is guaranteed to be fully mutable
in all positions i.e.
|
boolean |
isHermitian()
Returns true if a matrix is Hermitian
This is equivalent to isSymmetric(), since all Vectorz matrices have real values.
|
boolean |
isIdentity()
Checks if this is an identity matrix (i.e.
|
boolean |
isInvertible()
Checks if this is an invertible matrix (i.e.
|
boolean |
isLowerTriangular()
Returns true if a matrix is lower triangular.
|
boolean |
isMutable()
Returns true if the INDArray is mutable (at least partially)
|
boolean |
isOrthogonal()
Check to see if the matrix is orthogonal
(default tolerance: 1e-8)
|
boolean |
isOrthogonal(double tolerance)
Check to see if the matrix is orthogonal
|
boolean |
isPositiveDefinite()
Returns true if a matrix is positive definite
|
boolean |
isRectangularDiagonal()
Returns true iff this matrix is a diagonal matrix (might not be square)
|
boolean |
isSameShape(AMatrix a)
Returns true iff this matrix is exactly the same shape as another matrix
|
boolean |
isSameShape(INDArray a)
Returns true if this array is the same shape as another array
|
boolean |
isSquare()
Checks if this is a square matrix
|
boolean |
isSymmetric()
Returns true if a matrix is symmetric
|
boolean |
isUpperTriangular()
Returns true if a matrix is upper triangular
An upper triangular matrix is defined as having all elements equal to 0.0 where i > j
|
boolean |
isView()
Return true if this array is considered as a view type.
|
boolean |
isZero()
Returns true if the matrix is the zero matrix (all components zero)
|
Iterator<AVector> |
iterator()
Returns an iterator over rows in this Matrix
|
INDArray |
join(INDArray a,
int dimension)
Joins an array with another array along a specified dimension
|
void |
log()
Computes the natural logarithm (in-place) for all array elements
|
int |
lowerBandwidth()
Computes the lower bandwidth of a matrix, i.e.
|
int |
lowerBandwidthLimit()
A limit on the lower bandwidth of the banded matrix.
|
void |
mul(AMatrix a)
"Multiplies" this matrix by another, composing the transformation
|
void |
multiply(AMatrix m)
Multiplies this matrix in-place by another in an entrywise manner (Hadamard product).
|
void |
multiply(AVector v)
Multiply each row in this matrix by a vector.
|
void |
multiply(double factor)
Multiplies all elements of the array in place by a given double value
|
void |
multiply(INDArray a)
Multiplies all elements by the equivalent elements in a second array, i.e.
|
AMatrix |
multiplyCopy(double factor)
Returns a copy of the array with all elements multiplied by a single constant value
|
void |
multiplyRow(int i,
double factor)
Multiplies a row by a constant factor
This is an elementary row operation
|
AMatrix |
mutable()
Coerces this INDArray to a fully mutable format.
|
void |
negate()
Negates all elements in the array in place
|
long |
nonZeroCount()
Returns the number of non-zero elements in the array.
|
INDArray |
outerProduct(INDArray a)
Calculates the outer product of this array with another array.
|
int |
outputDimensions()
Returns the number of dimensions required for output vectors
|
void |
pow(double exponent)
Raises all elements of the array to a specified power in place
|
int |
rank()
Calculate the rank of a matrix.
|
void |
reciprocal()
Replaces all elements in the array with their reciprocal
|
double |
reduce(Op2 op)
Reduces over all elements of the array in row-major order.
|
double |
reduce(Op2 op,
double init)
Reduces over all elements of the array in row-major order.
|
AVector |
reduceSlices(Op2 op)
Reduces each slice of the array by the given operator
|
AVector |
reduceSlices(Op2 op,
double init)
Reduces each slice of the array by the given operator
Uses the specified init value for reduction of each slice
|
AMatrix |
reorder(int[] order)
Returns a re-ordered array by taking the specified order of slices along dimension 0
|
AMatrix |
reorder(int dim,
int[] order)
Returns a re-ordered array by taking the specified order of slices along a given dimension
May or may not use views of underlying slices (i.e.
|
void |
replaceColumn(int i,
AVector row)
Replaces a column in a matrix, adding the column to the internal structure of the matrix.
|
void |
replaceRow(int i,
AVector row)
Replaces a row in a matrix, adding the row to the internal structure of the matrix.
|
INDArray |
reshape(int... dimensions)
Returns a new array by rearranging the elements of this array into the desired shape
Truncates or zero-pads the elements as required to fill the new shape
|
Matrix |
reshape(int rows,
int cols) |
INDArray |
rotateView(int dimension,
int shift)
Returns rotated view of this array
|
double |
rowDotProduct(int i,
AVector a)
Returns the dot product of a specific row with a vector.
|
void |
scaleAdd(double factor,
double constant)
Scales all elements of the array by a given double value and adds a constant value
|
void |
scaleAdd(double factor,
INDArray b,
double bfactor,
double constant)
Scales all elements of the array by a given double value, adds a scaled second array and adds a constant value
|
void |
set(AMatrix a)
Sets this matrix with the element values from another matrix.
|
void |
set(AVector v)
Sets every row of this matrix with the element values from a vector.
|
void |
set(double value)
Sets all elements of an array to a specific double value
|
void |
set(INDArray a)
Sets this array to the element values contained in another array.
|
void |
set(int[] indexes,
double value)
Sets the element at the given indexed position in a mutable array
|
void |
set(int row,
double value)
Sets a value at a given position in a mutable 1D array
|
abstract void |
set(int i,
int j,
double value)
Sets a value at a given position in a mutable 2D array
|
void |
set(long[] indexes,
double value)
Sets the element at the given indexed position in a mutable array
|
void |
set(Object o)
Sets this array to the element values contained in the given object.
|
void |
setColumn(int i,
AVector col)
Sets a column in a matrix.
|
void |
setElements(double... values)
Sets all elements in an array using the given double values
|
void |
setElements(double[] values,
int offset)
Sets all elements in an array using the given double values
|
void |
setRow(int i,
AVector row)
Sets a row in a matrix to the value specified by the given vector
|
void |
signum()
Calculates the signum of all elements of this mutable array
Sets each component of the array to its sign value (-1, 0 or 1)
|
AVector |
slice(int row)
Returns the specified major slice of this array as a view (slice along dimension 0)
0 dimensional slice results are permitted, but attempting to slice a 0 dimensional array
will result in an error.
|
AVector |
slice(int dimension,
int index)
Returns a slice view of this array along the specified dimension
|
int |
sliceCount()
Returns the number of major slices in this array (i.e.
|
AMatrix |
sparse()
Coerces this INDArray to a sparse format, without changing its element values.
|
AMatrix |
sparseClone()
Creates a fully mutable clone of this array.
|
void |
sqrt()
Computes the square root of all elements in the array
|
void |
square()
Squares all elements of the array in place
|
void |
sub(AMatrix m)
Subtracts another matrix from this one
|
void |
sub(AVector v)
Subtracts a vector from every row of this matrix.
|
void |
sub(INDArray a)
Subtracts all the elements of another array from this array, in an elementwise order.
|
AMatrix |
subArray(int[] offsets,
int[] shape)
Returns a subarray view of a larger array
|
AMatrix |
subMatrix(int rowStart,
int rows,
int colStart,
int cols)
Gets a rectangular submatrix view of part of a matrix
|
void |
swapColumns(int i,
int j)
Swaps two columns of the matrix in place
|
void |
swapRows(int i,
int j)
Swaps two rows of the matrix in place
This is an elementary row operation
|
AAffineTransform |
toAffineTransform() |
Array |
toArray()
Coerces the array into a packed mutable Array instance
May return the same array if it is already a dense Array instance
|
double[] |
toDoubleArray()
Copies the elements of this array to a new double[] array.
|
void |
toDoubleBuffer(DoubleBuffer dest)
Copies the elements of this INDArray to the specified double buffer
|
Matrix |
toMatrix()
Coerces the matrix to the standard mutable Matrix type
in row major order.
|
Matrix |
toMatrixTranspose()
Coerces the transpose of a matrix to the standard mutable Matrix type
in row major order.
|
AMatrix |
toMutableMatrix()
Creates a fully mutable deep copy of this matrix
|
double[][] |
toNestedDoubleArrays()
Converts this matrix to nested double[][] array
|
AVector[] |
toSliceArray()
Copies the slices of this array to a new INDArray[]
|
String |
toString() |
String |
toStringFull() |
Vector |
toVector()
Coerces the array into a flattened dense Vector, in row-major order
May return the same array if it is already a Vector instance
|
double |
trace()
Computes the trace of a matrix, i.e.
|
void |
transform(AVector source,
AVector dest)
Transforms a source vector into a destination vector, using matrix multiplication (inner product).
|
void |
transform(Vector source,
Vector dest) |
void |
transformInPlace(ADenseArrayVector v) |
void |
transformInPlace(AVector v) |
AMatrix |
transposeInnerProduct(AMatrix s) |
AMatrix |
transposeInnerProduct(Matrix s) |
void |
transposeInPlace()
Transposes a matrix in place, if possible.
|
double |
unsafeGet(int i,
int j)
Gets an element in the matrix in an unsafe fashion, without performing bound checks
The result is undefined if the row and column are out of bounds.
|
void |
unsafeSet(int i,
int j,
double value)
Sets an element value in the matrix in an unsafe fashion, without performing bound checks
The result is undefined if the row and column are out of bounds.
|
int |
upperBandwidth()
Computes the upper bandwidth of a matrix, i.e.
|
int |
upperBandwidthLimit()
A limit on the upper bandwidth of the banded matrix.
|
void |
validate()
Validates the internal data structure of the INDArray.
|
absCopy, add, addAt, addInnerProduct, addPower, addPower, broadcastLike, checkMutable, componentCount, density, divideCopy, elementAbsPowSum, elementMax, elementMin, elementPowSum, elementProduct, equals, equalsArray, get, get, get, get, get, getComponent, getComponents, getElements, getElements, getElements, isDense, isSparse, join, multiplyCopy, negateCopy, reciprocalCopy, scale, scaleCopy, setElements, setInnerProduct, setMultiple, setMultiple, signumCopy, sliceValue, squareCopy, sub, sub, subCopy, withComponentsfinalize, getClass, notify, notifyAll, wait, wait, waitcolumnCount, rowCountabsCopy, addAt, addPower, addPower, broadcastLike, checkMutable, componentCount, divideCopy, elementAbsPowSum, elementMax, elementMin, elementPowSum, elementProduct, equalsArray, get, get, get, get, get, getComponent, getComponents, getElements, getElements, getElements, isDense, isSparse, join, multiplyCopy, negateCopy, reciprocalCopy, scale, scaleCopy, setElements, setInnerProduct, setMultiple, setMultiple, signumCopy, sliceValue, squareCopy, sub, subCopy, withComponentsforEach, spliteratorpublic abstract double get(int i,
int j)
INDArraypublic abstract void set(int i,
int j,
double value)
INDArraypublic final double get(int row)
INDArrayget in interface INDArrayget in class AbstractArray<AVector>public final double get()
INDArrayget in interface INDArrayget in class AbstractArray<AVector>public void set(int row,
double value)
INDArrayset in interface INDArrayset in class AbstractArray<AVector>public final void set(double value)
INDArrayset in interface INDArrayset in class AbstractArray<AVector>public void fill(double value)
INDArrayfill in interface INDArrayfill in class AbstractArray<AVector>public void unsafeSet(int i,
int j,
double value)
i - j - public double unsafeGet(int i,
int j)
i - j - public void clamp(double min,
double max)
INDArrayclamp in interface INDArrayclamp in class AbstractArray<AVector>public void pow(double exponent)
INDArraypow in interface INDArraypow in class AbstractArray<AVector>public void square()
INDArraysquare in interface INDArraysquare in class AbstractArray<AVector>public void set(int[] indexes,
double value)
INDArraypublic void set(long[] indexes,
double value)
INDArrayset in interface INDArrayset in class AbstractArray<AVector>public final int dimensionality()
INDArraydimensionality in interface INDArraypublic final int inputDimensions()
public final int outputDimensions()
public long elementCount()
INDArrayelementCount in interface INDArraypublic final AVector slice(int row)
INDArraypublic AVector slice(int dimension, int index)
INDArraypublic int sliceCount()
INDArraysliceCount in interface INDArraypublic final List<AVector> getSlices()
INDArraygetSlices in interface INDArraygetSlices in class AbstractArray<AVector>public List<AVector> getRows()
IMatrixpublic List<AVector> getColumns()
IMatrixgetColumns in interface IMatrixpublic final List<AVector> getSlices(int dimension)
INDArraygetSlices in interface INDArraygetSlices in class AbstractArray<AVector>public List<INDArray> getSliceViews()
INDArraygetSliceViews in interface INDArraygetSliceViews in class AbstractArray<AVector>public INDArray join(INDArray a, int dimension)
INDArrayjoin in interface INDArrayjoin in class AbstractArray<AVector>public int[] getShape()
INDArraypublic int[] getShapeClone()
INDArraygetShapeClone in interface INDArraygetShapeClone in class AbstractArray<AVector>public int getShape(int dim)
INDArraygetShape in interface INDArraygetShape in class AbstractArray<AVector>public long[] getLongShape()
INDArraygetLongShape in interface INDArraygetLongShape in class AbstractArray<AVector>public double get(int... indexes)
INDArraypublic AVector getLeadingDiagonal()
public AAffineTransform toAffineTransform()
public boolean isIdentity()
IMatrixisIdentity in interface IMatrixpublic boolean isSquare()
IMatrixpublic boolean isOrthogonal()
public boolean isOrthogonal(double tolerance)
tolerance - inner product of a column with all of the next columns should be less than tolerancepublic boolean hasOrthonormalColumns()
public boolean hasOrthonormalRows()
public INDArray reshape(int... dimensions)
INDArrayreshape in interface INDArrayreshape in class AbstractArray<AVector>public Matrix reshape(int rows, int cols)
public AMatrix reorder(int[] order)
INDArrayreorder in interface INDArrayreorder in class AbstractArray<AVector>public AMatrix reorder(int dim, int[] order)
INDArrayreorder in interface INDArrayreorder in class AbstractArray<AVector>public AMatrix subMatrix(int rowStart, int rows, int colStart, int cols)
IMatrixpublic AMatrix subArray(int[] offsets, int[] shape)
INDArraysubArray in interface INDArraysubArray in class AbstractArray<AVector>public INDArray rotateView(int dimension, int shift)
INDArrayrotateView in interface INDArrayrotateView in class AbstractArray<AVector>public void transform(AVector source, AVector dest)
IMatrixpublic void transformInPlace(AVector v)
transformInPlace in interface IMatrixpublic void transformInPlace(ADenseArrayVector v)
public AVector getRow(int row)
IMatrixpublic AVector getColumn(int column)
IMatrixpublic AVector getRowView(int row)
IMatrixgetRowView in interface IMatrixpublic AVector getColumnView(int column)
IMatrixgetColumnView in interface IMatrixpublic AVector getRowClone(int row)
IMatrixgetRowClone in interface IMatrixpublic AVector getColumnClone(int column)
IMatrixgetColumnClone in interface IMatrixpublic void set(AMatrix a)
a - public void set(INDArray a)
INDArrayset in interface INDArrayset in class AbstractArray<AVector>public void set(AVector v)
a - public void set(Object o)
INDArrayset in interface INDArrayset in class AbstractArray<AVector>public void getElements(double[] dest,
int offset)
INDArraygetElements in interface INDArraygetElements in class AbstractArray<AVector>public void setElements(double... values)
INDArraysetElements in interface INDArraysetElements in class AbstractArray<AVector>values - Element values in a double[] array. There must be at least as many element values as elements in this array.public void setElements(double[] values,
int offset)
INDArraysetElements in interface INDArraysetElements in class AbstractArray<AVector>values - Element values in a double[] array. There must be at least as many element values as elements in this array.offset - Position in the values array from which to start taking values.public abstract boolean isFullyMutable()
INDArrayisFullyMutable in interface INDArrayisFullyMutable in class AbstractArray<AVector>public boolean isMutable()
INDArrayisMutable in interface INDArrayisMutable in class AbstractArray<AVector>public boolean isElementConstrained()
INDArrayisElementConstrained in interface INDArrayisElementConstrained in class AbstractArray<AVector>public AMatrix clone()
INDArrayclone in interface INDArrayclone in class AbstractArray<AVector>public AMatrix copy()
INDArraycopy in interface INDArraycopy in class AbstractArray<AVector>public AMatrix sparseClone()
INDArraysparseClone in interface INDArraysparseClone in class AbstractArray<AVector>public AMatrix ensureMutable()
INDArrayensureMutable in interface INDArrayensureMutable in class AbstractArray<AVector>public double determinant()
public int rank()
public AMatrix toMutableMatrix()
public void transposeInPlace()
IMatrixtransposeInPlace in interface IMatrixpublic AMatrix getTranspose()
INDArraygetTranspose in interface INDArraygetTranspose in interface IMatrixgetTranspose in class AbstractArray<AVector>public AMatrix getTransposeView()
INDArraygetTransposeView in interface INDArraygetTransposeView in interface IMatrixgetTransposeView in class AbstractArray<AVector>public AMatrix getTransposeCopy()
getTransposeCopy in interface INDArraygetTransposeCopy in class AbstractArray<AVector>public void add(AMatrix m)
public void add(AVector v)
public void sub(AVector v)
public final void scaleAdd(double factor,
double constant)
INDArrayscaleAdd in interface INDArrayscaleAdd in class AbstractArray<AVector>public void scaleAdd(double factor,
INDArray b,
double bfactor,
double constant)
INDArrayscaleAdd in interface INDArrayscaleAdd in class AbstractArray<AVector>public void multiply(double factor)
INDArraymultiply in interface INDArraymultiply in class AbstractArray<AVector>public AMatrix multiplyCopy(double factor)
INDArraymultiplyCopy in interface INDArraymultiplyCopy in class AbstractArray<AVector>factor - A scalar factorpublic double elementSum()
elementSum in interface INDArrayelementSum in class AbstractArray<AVector>m - public double elementSquaredSum()
elementSquaredSum in interface INDArrayelementSquaredSum in class AbstractArray<AVector>m - public Iterator<Double> elementIterator()
INDArrayelementIterator in interface INDArrayelementIterator in class AbstractArray<AVector>public boolean isBoolean()
INDArrayisBoolean in interface INDArrayisBoolean in class AbstractArray<AVector>public long nonZeroCount()
INDArraynonZeroCount in interface INDArraynonZeroCount in class AbstractArray<AVector>public void sub(AMatrix m)
m - public void negate()
INDArraynegate in interface INDArraynegate in class AbstractArray<AVector>public void reciprocal()
INDArrayreciprocal in interface INDArrayreciprocal in class AbstractArray<AVector>public void abs()
INDArrayabs in interface INDArrayabs in class AbstractArray<AVector>public void sqrt()
INDArraysqrt in interface INDArraysqrt in class AbstractArray<AVector>public void log()
INDArraylog in interface INDArraylog in class AbstractArray<AVector>public void exp()
INDArrayexp in interface INDArrayexp in class AbstractArray<AVector>public void signum()
INDArraysignum in interface INDArraysignum in class AbstractArray<AVector>public void multiply(AMatrix m)
m - public void divide(AMatrix m)
m - public void mul(AMatrix a)
a - public void multiplyRow(int i,
double factor)
public void addRowMultiple(int src,
int dst,
double factor)
public void addInnerProduct(INDArray a, INDArray b)
INDArrayaddInnerProduct in interface INDArrayaddInnerProduct in class AbstractArray<AVector>public final void addInnerProduct(AMatrix a, INDArray b)
AbstractArrayaddInnerProduct in class AbstractArray<AVector>public void addInnerProduct(AMatrix a, AMatrix b)
public void addOuterProduct(INDArray a, INDArray b)
INDArrayaddOuterProduct in interface INDArrayaddOuterProduct in class AbstractArray<AVector>public void addOuterProduct(AVector a, AVector b)
a - b - public void addToArray(double[] data,
int offset)
INDArrayaddToArray in interface INDArrayaddToArray in class AbstractArray<AVector>public void swapRows(int i,
int j)
public void swapColumns(int i,
int j)
public void composeWith(AMatrix a)
public boolean isView()
INDArraypublic void addMultiple(INDArray src, double factor)
INDArrayaddMultiple in interface INDArrayaddMultiple in class AbstractArray<AVector>public void addMultiple(AVector v, double factor)
m - factor - public void addMultiple(AMatrix m, double factor)
m - factor - public final boolean epsilonEquals(INDArray a)
INDArrayepsilonEquals in interface INDArrayepsilonEquals in class AbstractArray<AVector>public final boolean epsilonEquals(INDArray a, double epsilon)
INDArrayepsilonEquals in interface INDArrayepsilonEquals in class AbstractArray<AVector>public boolean equals(Object o)
equals in class AbstractArray<AVector>public boolean equals(AMatrix a)
public boolean equalsArray(double[] data,
int offset)
INDArrayequalsArray in interface INDArrayequalsArray in class AbstractArray<AVector>data - Array of double element values to check for equalityoffset - Offset into the data arraypublic boolean elementsEqual(double value)
INDArrayelementsEqual in interface INDArrayelementsEqual in class AbstractArray<AVector>public boolean equalsTranspose(AMatrix a)
a - public boolean equals(INDArray v)
INDArrayequals in interface INDArrayequals in class AbstractArray<AVector>public final boolean epsilonEquals(AMatrix a)
public boolean epsilonEquals(AMatrix a, double epsilon)
protected boolean equalsByRows(AMatrix m)
public String toString()
toString in class AbstractArray<AVector>public String toStringFull()
toStringFull in class AbstractArray<AVector>public int hashCode()
hashCode in class AbstractArray<AVector>public AVector asVector()
asVector in interface INDArrayasVector in class AbstractArray<AVector>public List<Double> asElementList()
INDArrayasElementList in interface INDArrayasElementList in class AbstractArray<AVector>public AMatrix innerProduct(AMatrix a)
IMatrixinnerProduct in interface IMatrixpublic Vector innerProduct(Vector v)
IMatrixinnerProduct in interface IMatrixpublic AVector innerProduct(AVector v)
INDArrayinnerProduct in interface INDArrayinnerProduct in interface IMatrixinnerProduct in class AbstractArray<AVector>v - A vectorpublic final AMatrix innerProduct(AScalar s)
INDArrayinnerProduct in interface INDArrayinnerProduct in class AbstractArray<AVector>public final AMatrix innerProduct(double d)
INDArrayinnerProduct in interface INDArrayinnerProduct in class AbstractArray<AVector>public INDArray innerProduct(INDArray a)
INDArrayinnerProduct in interface INDArrayinnerProduct in class AbstractArray<AVector>public INDArray outerProduct(INDArray a)
INDArrayouterProduct in interface INDArrayouterProduct in class AbstractArray<AVector>public double rowDotProduct(int i,
AVector a)
i - a - public AMatrix inverse()
public double trace()
IMatrixpublic double diagonalProduct()
diagonalProduct in interface IMatrixpublic boolean isInvertible()
IMatrixisInvertible in interface IMatrixpublic Vector toVector()
INDArraytoVector in interface INDArraytoVector in class AbstractArray<AVector>public Array toArray()
INDArraytoArray in interface INDArraytoArray in class AbstractArray<AVector>public Matrix toMatrix()
public Matrix toMatrixTranspose()
public void toDoubleBuffer(DoubleBuffer dest)
INDArraytoDoubleBuffer in interface INDArraytoDoubleBuffer in class AbstractArray<AVector>public double[] toDoubleArray()
INDArraytoDoubleArray in interface INDArraytoDoubleArray in class AbstractArray<AVector>public double[][] toNestedDoubleArrays()
IMatrixtoNestedDoubleArrays in interface IMatrixpublic AVector[] toSliceArray()
INDArraytoSliceArray in interface INDArraytoSliceArray in class AbstractArray<AVector>public double[] asDoubleArray()
INDArrayasDoubleArray in interface INDArrayasDoubleArray in class AbstractArray<AVector>public void applyOp(Op op)
INDArrayapplyOp in interface INDArrayapplyOp in class AbstractArray<AVector>public AMatrix applyOpCopy(Op op)
INDArrayapplyOpCopy in interface INDArrayapplyOpCopy in class AbstractArray<AVector>public void applyOp(Op2 op, INDArray b)
INDArrayapplyOp in interface INDArrayapplyOp in class AbstractArray<AVector>public void applyOp(Op2 op, double b)
INDArrayapplyOp in interface INDArrayapplyOp in class AbstractArray<AVector>public void applyOp(IOperator op)
INDArrayapplyOp in interface INDArrayapplyOp in class AbstractArray<AVector>op - The operator to apply to the arraypublic double reduce(Op2 op, double init)
INDArrayreduce in interface INDArrayreduce in class AbstractArray<AVector>public double reduce(Op2 op)
INDArrayreduce in interface INDArrayreduce in class AbstractArray<AVector>public AVector reduceSlices(Op2 op)
INDArrayreduceSlices in interface INDArrayreduceSlices in class AbstractArray<AVector>public AVector reduceSlices(Op2 op, double init)
INDArrayreduceSlices in interface INDArrayreduceSlices in class AbstractArray<AVector>public void add(INDArray a)
INDArrayadd in interface INDArrayadd in class AbstractArray<AVector>public void multiply(AVector v)
v - public void multiply(INDArray a)
INDArraymultiply in interface INDArraymultiply in class AbstractArray<AVector>public void divide(AVector v)
v - public void divide(INDArray a)
INDArraydivide in interface INDArraydivide in class AbstractArray<AVector>public void divide(double factor)
INDArraydivide in interface INDArraydivide in class AbstractArray<AVector>public void sub(INDArray a)
INDArraysub in interface INDArraysub in class AbstractArray<AVector>public void add(double d)
INDArrayadd in interface INDArrayadd in class AbstractArray<AVector>public void addAt(int i,
int j,
double d)
IMatrixpublic INDArray broadcast(int... targetShape)
INDArraybroadcast in interface INDArraybroadcast in class AbstractArray<AVector>public INDArray broadcastLike(INDArray target)
INDArraybroadcastLike in interface INDArraybroadcastLike in class AbstractArray<AVector>target - The target arraypublic AMatrix broadcastLike(AMatrix target)
INDArraybroadcastLike in interface INDArraybroadcastLike in class AbstractArray<AVector>target - The target matrixpublic INDArray broadcastCloneLike(INDArray target)
INDArraybroadcastCloneLike in interface INDArraybroadcastCloneLike in class AbstractArray<AVector>target - The target arraypublic INDArray broadcastCopyLike(INDArray target)
INDArraybroadcastCopyLike in interface INDArraybroadcastCopyLike in class AbstractArray<AVector>target - The target arraypublic boolean isZero()
isZero in interface INDArrayisZero in class AbstractArray<AVector>public boolean isPositiveDefinite()
public boolean isDiagonal()
IMatrixisDiagonal in interface IMatrixpublic boolean isSameShape(INDArray a)
INDArrayisSameShape in interface INDArrayisSameShape in class AbstractArray<AVector>public boolean isSameShape(AMatrix a)
a - public boolean isRectangularDiagonal()
IMatrixisRectangularDiagonal in interface IMatrixpublic boolean isSymmetric()
isSymmetric in interface IMatrixpublic final boolean isHermitian()
public boolean isUpperTriangular()
public boolean isLowerTriangular()
public int upperBandwidthLimit()
public int lowerBandwidthLimit()
public int bandLength(int band)
band - public final int bandStartRow(int band)
band - public final int bandStartColumn(int band)
band - protected static final int bandLength(int rc,
int cc,
int band)
public final int bandIndex(int i,
int j)
i - j - public final int bandPosition(int i,
int j)
i - j - public int upperBandwidth()
public int lowerBandwidth()
public AVector getBand(int band)
public AVector getBandWrapped(int band)
public void setRow(int i,
AVector row)
i - row - public void replaceRow(int i,
AVector row)
i - row - public void replaceColumn(int i,
AVector row)
i - row - public void setColumn(int i,
AVector col)
i - row - public abstract AMatrix exactClone()
INDArrayexactClone in interface INDArraypublic INDArray immutable()
INDArrayimmutable in interface INDArrayimmutable in class AbstractArray<AVector>public AMatrix mutable()
INDArraymutable in interface INDArraymutable in class AbstractArray<AVector>public AMatrix sparse()
INDArraysparse in interface INDArraysparse in class AbstractArray<AVector>public AMatrix dense()
INDArraydense in interface INDArraydense in class AbstractArray<AVector>public final Matrix denseClone()
INDArraydenseClone in interface INDArraydenseClone in class AbstractArray<AVector>public void validate()
INDArrayvalidate in interface INDArrayvalidate in class AbstractArray<AVector>public void copyRowTo(int i,
double[] dest,
int destOffset)
i - The index of the selected rowdest - Destination double[] arraydestOffset - Offset into destination arraypublic void copyColumnTo(int j,
double[] dest,
int destOffset)
i - The index of the selected columndest - Destination double[] arraydestOffset - public final INDArray addCopy(INDArray a)
INDArrayaddCopy in interface INDArrayaddCopy in class AbstractArray<AVector>public AMatrix addCopy(AMatrix a)
IMatrixpublic AMatrix addCopy(AVector v)
IMatrixpublic AMatrix addCopy(double d)
INDArrayaddCopy in interface INDArrayaddCopy in class AbstractArray<AVector>public Matrix addCopy(AStridedMatrix a)
m - A matrix. Not modified.public boolean hasUncountable()
hasUncountable in interface INDArrayhasUncountable in class AbstractArray<AVector>m - A matrix. Not modified.public int checkSquare()
protected int checkRowCount(int expected)
expected - protected int checkColumnCount(int expected)
expected - protected final void checkDimension(int dimension)
AbstractArraycheckDimension in class AbstractArray<AVector>protected void checkSameShape(AMatrix m)
m - protected void checkSameShape(ARectangularMatrix m)
m - protected void checkShape(int rows,
int cols)
protected void checkIndex(int i,
int j)
public int checkColumn(int column)
public int checkRow(int row)
Copyright © 2016. All rights reserved.