public abstract class AMatrix extends ALinearTransform implements IMatrix, Iterable<AVector>, INDArray
| Constructor and Description |
|---|
AMatrix() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(AMatrix m)
Adds another matrix to this matrix.
|
void |
addMultiple(AMatrix m,
double factor) |
AVector |
asVector()
Returns the matrix values as a single reference Vector in the form [row0
row1 row2....]
|
double |
calculateElement(int i,
AVector v)
Calculates a single element of the output.
|
AMatrix |
clone()
Clones the transform, performing a deep copy where needed
|
AVector |
cloneRow(int row) |
abstract int |
columnCount()
Returns the number of columns in the matrix
|
AMatrix |
compose(AMatrix a) |
ATransform |
compose(ATransform a)
Composes this transformation with another transformation, returning
a new combined transformation
|
void |
composeWith(AMatrix a) |
void |
composeWith(ATransform a)
Composes this transformation with a given transformation,
mutating the transformation to represent the combined transform
|
AMatrix |
copyOfMatrix()
Returns a deep copy of the transformation matrix for this affine transform
|
AVector |
copyOfTranslationVector()
Returns a deep copy of the translation vector for this affine transform
|
double |
determinant()
Calculates the determinant of the matrix.
|
int |
dimensionality() |
double |
elementSum()
Returns the sum of all elements in the matrix
|
void |
entrywiseMul(AMatrix m)
Multiplies this matrix in-place by another in an entrywise manner (Hadamard product).
|
boolean |
epsilonEquals(AMatrix a)
Returns true if this matrix is approximately equal to
a second matrix, up to a default tolerance level
|
boolean |
equals(AAffineTransform a) |
boolean |
equals(AMatrix a) |
boolean |
equals(Object o) |
double |
get(int... indexes) |
abstract double |
get(int row,
int column)
Returns a specified element in the matrix
|
AVector |
getColumn(int column)
Returns a column of the matrix as a vector view
|
AVector |
getLeadingDiagonal()
Returns a new vector that contains the leading diagonal values of the matrix
|
AMatrix |
getMatrixComponent() |
AVector |
getRow(int row)
Returns a row of the matrix as a vector view
|
AMatrix |
getTranspose()
Returns a transposed version of this matrix.
|
int |
hashCode() |
int |
inputDimensions()
Returns the number of dimensions required for input vectors
|
AMatrix |
inverse()
Return the inverse of this transformation if possible
|
boolean |
isFullyMutable() |
boolean |
isIdentity()
Returns true if this transform is the identity function, i.e.
|
boolean |
isInvertible()
Returns true if this transform is invertible
|
boolean |
isSquare()
Returns true if the transform is square (same number of input and output dimensions)
|
boolean |
isZeroMatrix()
Returns true if the matrix is the zero matrix (all components zero)
|
Iterator<AVector> |
iterator()
Returns an iterator over rows in this Matrix
|
void |
mul(AMatrix a)
"Multiplies" this matrix by another, composing the transformation
|
int |
outputDimensions()
Returns the number of dimensions required for output vectors
|
INDArray |
reshape(int... dimensions) |
abstract int |
rowCount()
Returns the number of rows in the matrix
|
void |
scale(double factor)
Scales a matrix by a constant scalar factor.
|
void |
set(AMatrix a) |
abstract void |
set(int row,
int column,
double value)
Sets a specified element in the matrix
|
void |
sub(AMatrix m)
Subtracts another matrix from this one
|
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
|
AAffineTransform |
toAffineTransform() |
AMatrix |
toMutableMatrix()
Creates a fully mutable deep copy of this matrix
|
String |
toString() |
AVector |
toVector()
Converts the matrix to a single flattened vector
in row major order.
|
void |
transform(AVector source,
AVector dest)
Transforms the source vector, storing the result in the given destination vector
|
void |
transformInPlace(AVector v)
Transforms a vector destructively.
|
void |
transposeInPlace() |
getTranslationComponent, isLinearcompose, transformNormaltakeComponents, takeComponents, takeComponents, transformpublic abstract int rowCount()
public abstract int columnCount()
columnCount in interface IMatrixpublic abstract double get(int row,
int column)
public abstract void set(int row,
int column,
double value)
public int dimensionality()
dimensionality in interface INDArraypublic AVector getLeadingDiagonal()
public double calculateElement(int i,
AVector v)
ATransformcalculateElement in class AAffineTransformpublic AAffineTransform toAffineTransform()
toAffineTransform in class AAffineTransformpublic AMatrix getMatrixComponent()
getMatrixComponent in class AAffineTransformpublic boolean isIdentity()
ATransformisIdentity in class AAffineTransformpublic boolean isSquare()
ATransformisSquare in class ATransformpublic int inputDimensions()
ATransforminputDimensions in class ATransformpublic int outputDimensions()
ATransformoutputDimensions in class ATransformpublic void transform(AVector source, AVector dest)
ATransformtransform in class AAffineTransformpublic void transformInPlace(AVector v)
ATransformtransformInPlace in class AAffineTransformpublic AVector getRow(int row)
public AVector getColumn(int column)
public AVector cloneRow(int row)
public void set(AMatrix a)
public boolean isFullyMutable()
public AMatrix clone()
ATransformclone in class ATransformpublic double determinant()
public AMatrix toMutableMatrix()
public void transposeInPlace()
public AMatrix getTranspose()
public void add(AMatrix m)
m - public void scale(double factor)
m - public double elementSum()
m - public void sub(AMatrix m)
m - public void entrywiseMul(AMatrix m)
m - public void mul(AMatrix a)
a - public void composeWith(ATransform a)
ATransformcomposeWith in class ATransformpublic void composeWith(AMatrix a)
public AMatrix copyOfMatrix()
AAffineTransformcopyOfMatrix in class AAffineTransformpublic AVector copyOfTranslationVector()
AAffineTransformcopyOfTranslationVector in class AAffineTransformpublic void addMultiple(AMatrix m, double factor)
public boolean equals(Object o)
equals in class AAffineTransformpublic boolean equals(AMatrix a)
public boolean epsilonEquals(AMatrix a)
public boolean equals(AAffineTransform a)
equals in class AAffineTransformpublic int hashCode()
hashCode in class AAffineTransformpublic AVector asVector()
public ATransform compose(ATransform a)
ATransformcompose in class AAffineTransformpublic AMatrix inverse()
ATransforminverse in class AAffineTransformpublic boolean isInvertible()
ATransformisInvertible in class AAffineTransformpublic void swapRows(int i,
int j)
public void swapColumns(int i,
int j)
public AVector toVector()
public boolean isZeroMatrix()
Copyright © 2013. All Rights Reserved.