public abstract class Matrix extends DefinitionalObject implements IEquatableEpsilon<Matrix>
| Modifier | Constructor and Description |
|---|---|
protected |
Matrix(int rowDimension,
int columnDimension)
Initializes a new instance with the specified dimensions.
|
protected |
Matrix(Matrix existingInstance,
CopyContext context)
Initializes a new instance as a copy of an existing instance.
|
| Modifier and Type | Method and Description |
|---|---|
static Matrix |
add(Matrix3By3 leftAddend,
Matrix rightAddend)
Creates a
Matrix which is the sum of the two given matrices. |
static Matrix |
add(Matrix6By6 left,
Matrix rightAddend)
Creates a
Matrix which is the sum of the two given matrices. |
static Matrix |
add(Matrix leftAddend,
Matrix rightAddend)
Creates a
Matrix which is the sum of the two given matrices. |
static Matrix |
add(Matrix leftAddend,
Matrix3By3 rightAddend)
Creates a
Matrix which is the sum of the two given matrices. |
static Matrix |
add(Matrix leftAddend,
Matrix6By6 rightAddend)
Creates a
Matrix which is the sum of the two given matrices. |
static void |
addAssign(Matrix leftAddend,
Matrix rightAddend,
Matrix sum)
|
protected boolean |
checkForSameDefinition(DefinitionalObject other)
Checks to determine if another instance has the same definition as this instance and
returns
true if it does. |
protected abstract boolean |
checkForSameDefinition(Matrix other)
Checks to determine if another instance has the same definition as this instance and
returns
true if it does. |
protected int |
computeCurrentDefinitionHashCode()
Computes a hash code based on the current properties of this object.
|
static Matrix |
elementDivide(Matrix3By3 dividend,
Matrix divisor)
Creates a new
Matrix which is the element-by-element division of
the two given matrices. |
static Matrix |
elementDivide(Matrix6By6 dividend,
Matrix divisor)
Creates a new
Matrix which is the element-by-element division of
the two given matrices. |
static Matrix |
elementDivide(Matrix dividend,
Matrix divisor)
Creates a new
Matrix which is the element-by-element division of
the two given matrices. |
static Matrix |
elementDivide(Matrix dividend,
Matrix3By3 divisor)
Creates a new
Matrix which is the element-by-element division of
the two given matrices. |
static Matrix |
elementDivide(Matrix dividend,
Matrix6By6 divisor)
Creates a new
Matrix which is the element-by-element division of
the two given matrices. |
static void |
elementDivideAssign(Matrix dividend,
Matrix divisor,
Matrix quotient)
|
static Matrix |
elementMultiply(Matrix3By3 multiplicand,
Matrix multiplier)
Creates a new
Matrix which is the element-by-element multiplication of
the two given matrices. |
static Matrix |
elementMultiply(Matrix6By6 multiplicand,
Matrix multiplier)
Creates a new
Matrix which is the element-by-element multiplication of
the two given matrices. |
static Matrix |
elementMultiply(Matrix multiplicand,
Matrix multiplier)
Creates a new
Matrix which is the element-by-element multiplication of
the two given matrices. |
static Matrix |
elementMultiply(Matrix multiplicand,
Matrix3By3 multiplier)
Creates a new
Matrix which is the element-by-element multiplication of
the two given matrices. |
static Matrix |
elementMultiply(Matrix multiplicand,
Matrix6By6 multiplier)
Creates a new
Matrix which is the element-by-element multiplication of
the two given matrices. |
static void |
elementMultiplyAssign(Matrix multiplicand,
Matrix multiplier,
Matrix product)
Sets the product
Matrix to equal the element-wise multiplication
of the multiplicand times the multiplier. |
static boolean |
equals(Matrix left,
Matrix right)
Indicates whether the two provided matrices hold the same data.
|
boolean |
equalsEpsilon(Matrix other,
double epsilon)
Indicates whether each cell value of another instance of this type
is within the required tolerance of the corresponding coordinate value of this instance.
|
abstract double |
get(int rowIndex,
int columnIndex)
Gets the value of the element at the given location.
|
int |
getColumnDimension()
Gets the number of columns in this matrix.
|
Matrix |
getFrozenCopy()
Gets a frozen copy of this
Matrix. |
Matrix |
getMatrix(int[] rowArray,
int[] columnArray)
Gets a new matrix with the values of the specified subset of this matrix.
|
void |
getMatrix(int[] rowArray,
int[] columnArray,
Matrix destination)
Places the values of a subsection of this matrix into the given matrix.
|
Matrix |
getMatrix(int[] rowArray,
int firstColumn,
int numberOfColumns)
Gets a new matrix with the values of the specified subset of this matrix.
|
void |
getMatrix(int[] rowArray,
int firstColumn,
int numberOfColumns,
Matrix destination)
Places the values of a subsection of this matrix into the given matrix.
|
Matrix |
getMatrix(int firstRow,
int numberOfRows,
int[] columnArray)
Gets a new matrix with the values of the specified subset of this matrix.
|
void |
getMatrix(int firstRow,
int numberOfRows,
int[] columnArray,
Matrix destination)
Places the values of a subsection of this matrix into the given matrix.
|
Matrix |
getMatrix(int firstRow,
int numberOfRows,
int firstColumn,
int numberOfColumns)
Gets a new matrix with the values of the specified subset of this matrix.
|
void |
getMatrix(int firstRow,
int numberOfRows,
int firstColumn,
int numberOfColumns,
Matrix destination)
Places the values of a subsection of this matrix into the given matrix.
|
int |
getRowDimension()
Gets the number of rows in this matrix.
|
abstract Matrix |
multiply(double factor)
Creates a new
Matrix which has the value of the current matrix multiplied by the given factor. |
static Matrix |
multiply(double factor,
Matrix matrix)
Creates a new
Matrix which has the value of the given matrix multiplied by the given factor. |
static Matrix |
multiply(Matrix3By3 multiplicand,
Matrix multiplier)
Creates a
Matrix which is the linear algebra multiplication of
the two given matrices. |
static Matrix |
multiply(Matrix6By6 multiplicand,
Matrix multiplier)
Creates a
Matrix which is the linear algebra multiplication of
the two given matrices. |
static Matrix |
multiply(Matrix matrix,
double factor)
Creates a new
Matrix which has the value of the given matrix multiplied by the given factor. |
static Matrix |
multiply(Matrix multiplicand,
Matrix multiplier)
Creates a
Matrix which is the linear algebra multiplication of
the two given matrices. |
static Matrix |
multiply(Matrix multiplicand,
Matrix3By3 multiplier)
Creates a
Matrix which is the linear algebra multiplication of
the two given matrices. |
static Matrix |
multiply(Matrix multiplicand,
Matrix6By6 multiplier)
Creates a
Matrix which is the linear algebra multiplication of
the two given matrices. |
static void |
multiplyAssign(Matrix multiplicand,
Matrix multiplier,
Matrix product)
Sets the product
Matrix to equal the linear algebra multiplication
of the multiplicand times the multiplier. |
abstract void |
set(int rowIndex,
int columnIndex,
double value)
Sets the value of the element at the given location.
|
void |
setMatrix(int[] rowArray,
int[] columnArray,
Matrix origin)
Sets the contents of a subset of this matrix to equal the values of the given
origin matrix. |
void |
setMatrix(int[] destinationRowArray,
int[] destinationColumnArray,
Matrix origin,
int[] originRowArray,
int[] originColumnArray)
Sets the contents of a subset of this matrix to equal the values of the given
origin matrix. |
void |
setMatrix(int[] rowArray,
int firstColumn,
int numberOfColumns,
Matrix origin)
Sets the contents of a subset of this matrix to equal the values of the given
origin matrix. |
void |
setMatrix(int firstRow,
int numberOfRows,
int[] columnArray,
Matrix origin)
Sets the contents of a subset of this matrix to equal the values of the given
origin matrix. |
void |
setMatrix(int firstRow,
int numberOfRows,
int firstColumn,
int numberOfColumns,
Matrix origin)
Sets the contents of a subset of this matrix to equal the values of the given
origin matrix. |
static Matrix |
subtract(Matrix3By3 minuend,
Matrix subtrahend)
Creates a
Matrix whose elements have the values of the elements of the minuend matrix
subtracted by the elements of the subtrahend matrix. |
static Matrix |
subtract(Matrix6By6 minuend,
Matrix subtrahend)
Creates a
Matrix whose elements have the values of the elements of the minuend matrix
subtracted by the elements of the subtrahend matrix. |
static Matrix |
subtract(Matrix minuend,
Matrix subtrahend)
Creates a
Matrix whose elements have the values of the elements of the minuend matrix
subtracted by the elements of the subtrahend matrix. |
static Matrix |
subtract(Matrix minuend,
Matrix3By3 subtrahend)
Creates a
Matrix whose elements have the values of the elements of the minuend matrix
subtracted by the elements of the subtrahend matrix. |
static Matrix |
subtract(Matrix minuend,
Matrix6By6 subtrahend)
Creates a
Matrix whose elements have the values of the elements of the minuend matrix
subtracted by the elements of the subtrahend matrix. |
static void |
subtractAssign(Matrix minuend,
Matrix subtrahend,
Matrix difference)
|
String |
toString()
Returns a string representation of the matrix.
|
abstract Matrix |
transpose()
Creates a new
Matrix which is the transpose of the current matrix. |
areSameDefinition, areSameDefinition, areSameDefinition, areSameDefinition, areSameDefinition, clone, collectionItemsAreSameDefinition, collectionItemsAreSameDefinition, collectionItemsAreSameDefinition, dictionaryItemsAreSameDefinition, enumerateDependencies, freeze, freezeAggregatedObjects, getCollectionHashCode, getCollectionHashCode, getCollectionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDefinitionHashCode, getDictionaryHashCode, getIsFrozen, isSameDefinition, throwIfFrozenprotected Matrix(int rowDimension,
int columnDimension)
rowDimension - The number of rows in the new matrix.columnDimension - The number of columns in the new matrix.ArgumentOutOfRangeException - Thrown when rowDimension or columnDimension are less than zero.protected Matrix(@Nonnull Matrix existingInstance, @Nonnull CopyContext context)
See ICloneWithContext.clone(CopyContext) for more information about how to implement this constructor
in a derived class.
existingInstance - The existing instance to copy.context - A CopyContext that controls the depth of the copy.ArgumentNullException - Thrown when existingInstance or context is null.protected final boolean checkForSameDefinition(DefinitionalObject other)
true if it does. Derived classes MUST override this method and check
all new fields introduced by the derived class for definitional equivalence. It is NOT necessary
to check base class fields because the base class will already have done that. When overriding this method,
you should NOT call the base implementation because it will return false for all derived-class instances.
Derived classes should check the type of other to preserve the symmetric nature of IEquatableDefinition.isSameDefinition(java.lang.Object).checkForSameDefinition in class DefinitionalObjectother - The other instance to compare to this one.true if the two objects are defined equivalently; otherwise false.protected abstract boolean checkForSameDefinition(Matrix other)
true if it does. Derived classes MUST override this method and check
all new fields introduced by the derived class for definitional equivalence. It is NOT necessary
to check base class fields because the base class will already have done that. When overriding this method,
you should NOT call the base implementation because it will return false for all derived-class instances.
Derived classes should check the type of other to preserve the symmetric nature of IEquatableDefinition.isSameDefinition(java.lang.Object).other - The other instance to compare to this one.true if the two objects are defined equivalently; otherwise false.protected int computeCurrentDefinitionHashCode()
Matrix.checkForSameDefinition(agi.foundation.infrastructure.DefinitionalObject) method.computeCurrentDefinitionHashCode in class DefinitionalObject@Nonnull public final Matrix getFrozenCopy()
Matrix. If this matrix is already frozen it returns a reference
to itself, otherwise it clones itself, freezes the clone, and returns that object.@Nonnull public abstract Matrix transpose()
Matrix which is the transpose of the current matrix.@Nonnull public abstract Matrix multiply(double factor)
Matrix which has the value of the current matrix multiplied by the given factor.factor - The 'scalar' to multiply by the current Matrix.public final boolean equalsEpsilon(@Nullable Matrix other, double epsilon)
equalsEpsilon in interface IEquatableEpsilon<Matrix>other - The Matrix to compare to this instance.epsilon - The limit at which the absolute differences between the coordinate values will not be considered equal.true if the absolute differences are less than or equal to epsilon; otherwise false.@Nonnull public final Matrix getMatrix(int firstRow, int numberOfRows, int firstColumn, int numberOfColumns)
firstRow - Inclusive initial index of rows to output from this matrix.numberOfRows - Number of rows to output from this matrix.firstColumn - Inclusive initial index of columns to output from this matrix.numberOfColumns - Number of columns to output from this matrix.ArgumentOutOfRangeException - Thrown when firstRow, numberOfRows, firstColumn, or numberOfColumns is less than 0.ArgumentException - Thrown when firstRow plus numberOfRows is greater than the row dimension of this matrix,
or when firstColumn plus numberOfColumns is greater than the column dimension of this matrix.public final void getMatrix(int firstRow,
int numberOfRows,
int firstColumn,
int numberOfColumns,
@Nonnull
Matrix destination)
destination
matrix must match the dimensions of the requested submatrix.firstRow - Inclusive initial index of rows to output from this matrix.numberOfRows - Number of rows to output from this matrix.firstColumn - Inclusive initial index of columns to output from this matrix.numberOfColumns - Number of columns to output from this matrix.destination - The matrix to fill with the values of the submatrix.ArgumentNullException - Thrown when destination is null.ArgumentOutOfRangeException - Thrown when firstRow, numberOfRows, firstColumn, or numberOfColumns is less than 0.ArgumentException - Thrown when firstRow plus numberOfRows is greater than the row dimension of this matrix,
or when firstColumn plus numberOfColumns is greater than the column dimension of this matrix,
or when the row dimension of destination is not equal to numberOfRows,
or when the column dimension of destination is not equal to numberOfColumns.@Nonnull public final Matrix getMatrix(@Nonnull int[] rowArray, int firstColumn, int numberOfColumns)
rowArray - Array of indices of rows to output from this matrix.firstColumn - Inclusive initial index of columns to output from this matrix.numberOfColumns - Number of columns to output from this matrix.ArgumentNullException - Thrown when rowArray is null.ArgumentOutOfRangeException - Thrown when firstColumn or numberOfColumns is less than 0.ArgumentException - Thrown when firstColumn plus numberOfColumns is greater than the column dimension of this matrix,
or when rowArray contains values less than zero or greater than or equal to the row dimension of this matrix.public final void getMatrix(@Nonnull int[] rowArray, int firstColumn, int numberOfColumns, @Nonnull Matrix destination)
destination
matrix must match the dimensions of the requested submatrix.rowArray - Array of indices of rows to output from this matrix.firstColumn - Inclusive initial index of columns to output from this matrix.numberOfColumns - Number of columns to output from this matrix.destination - The matrix to fill with the values of the submatrix.ArgumentNullException - Thrown when rowArray or destination is null.ArgumentOutOfRangeException - Thrown when firstColumn or numberOfColumns is less than 0.ArgumentException - Thrown when firstColumn plus numberOfColumns is greater than the column dimension of this matrix,
or when the row dimension of destination is not equal to the length of rowArray,
or when the column dimension of destination is not equal to numberOfColumns,
or when rowArray contains values less than zero or greater than or equal to the row dimension of this matrix.@Nonnull public final Matrix getMatrix(int firstRow, int numberOfRows, @Nonnull int[] columnArray)
firstRow - Inclusive initial index of rows to output from this matrix.numberOfRows - Number of rows to output from this matrix.columnArray - Array of indices of columns to output from this matrix.ArgumentNullException - Thrown when columnArray is null.ArgumentOutOfRangeException - Thrown when firstRow or numberOfRows is less than 0.ArgumentException - Thrown when firstRow plus numberOfRows is greater than the row dimension of this matrix,
or when columnArray contains values less than zero or greater than or equal to the column dimension of this matrix.public final void getMatrix(int firstRow,
int numberOfRows,
@Nonnull
int[] columnArray,
@Nonnull
Matrix destination)
destination
matrix must match the dimensions of the requested submatrix.firstRow - Inclusive initial index of rows to output from this matrix.numberOfRows - Number of rows to output from this matrix.columnArray - Array of indices of columns to output from this matrix.destination - The matrix to fill with the values of the submatrix.ArgumentNullException - Thrown when columnArray or destination is null.ArgumentOutOfRangeException - Thrown when firstRow or numberOfRows is less than 0.ArgumentException - Thrown when firstRow plus numberOfRows is greater than the row dimension of this matrix,
or when the row dimension of destination is not equal to numberOfRows,
or when the column dimension of destination is not equal to the length of columnArray,
or when columnArray contains values less than zero or greater than or equal to the column dimension of this matrix.@Nonnull public final Matrix getMatrix(@Nonnull int[] rowArray, @Nonnull int[] columnArray)
rowArray - Array of indices of rows to output from this matrix.columnArray - Array of indices of columns to output from this matrix.ArgumentNullException - Thrown when rowArray or columnArray is null.ArgumentException - Thrown when rowArray contains values less than zero or greater than or equal to the row dimension of this matrix,
or when columnArray contains values less than zero or greater than or equal to the column dimension of this matrix.public final void getMatrix(@Nonnull int[] rowArray, @Nonnull int[] columnArray, @Nonnull Matrix destination)
destination
matrix must match the dimensions of the requested submatrix.rowArray - Array of indices of rows to output from this matrix.columnArray - Array of indices of columns to output from this matrix.destination - The matrix to fill with the values of the submatrix.ArgumentNullException - Thrown when rowArray, columnArray, or destination is null.ArgumentException - Thrown when the row dimension of destination is not equal to the length of rowArray,
or when the column dimension of destination is not equal to the length of columnArray,
or when rowArray contains values less than zero or greater than or equal to the row dimension of this matrix,
or when columnArray contains values less than zero or greater than or equal to the column dimension of this matrix.public final void setMatrix(int firstRow,
int numberOfRows,
int firstColumn,
int numberOfColumns,
@Nonnull
Matrix origin)
origin matrix.
The origin matrix must match the dimensions of the requested submatrix.firstRow - Inclusive initial index of rows to receive input from the origin matrix.numberOfRows - Number of rows to receive input from the origin matrix.firstColumn - Inclusive initial index of columns to receive input from the origin matrix.numberOfColumns - Number of columns to receive input from the origin matrix.origin - The matrix containing the subset of values to set to the elements of this matrix.ArgumentNullException - Thrown when origin is null.ArgumentOutOfRangeException - Thrown when firstRow, numberOfRows, firstColumn, or numberOfColumns is less than 0.ArgumentException - Thrown when firstRow plus numberOfRows is greater than the row dimension of this matrix,
or when firstColumn plus numberOfColumns is greater than the column dimension of this matrix,
or when the row dimension of origin is not equal to numberOfRows,
or when the column dimension of origin is not equal to numberOfColumns.public final void setMatrix(@Nonnull int[] rowArray, int firstColumn, int numberOfColumns, @Nonnull Matrix origin)
origin matrix.
The origin matrix must match the dimensions of the requested submatrix.rowArray - Array of indices of rows to receive input from the origin matrix.firstColumn - Inclusive initial index of columns to receive input from the origin matrix.numberOfColumns - Number of columns to receive input from the origin matrix.origin - The matrix containing the subset of values to set to the elements of this matrix.ArgumentNullException - Thrown when origin is null.ArgumentOutOfRangeException - Thrown when firstColumn, or numberOfColumns is less than 0.ArgumentException - Thrown when firstColumn plus numberOfColumns is greater than the column dimension of this matrix,
or when the row dimension of origin is not equal to the length of rowArray,
or when the column dimension of origin is not equal to numberOfColumns,
or when rowArray contains values less than zero or greater than or equal to the row dimension of this matrix.public final void setMatrix(int firstRow,
int numberOfRows,
@Nonnull
int[] columnArray,
@Nonnull
Matrix origin)
origin matrix.
The origin matrix must match the dimensions of the requested submatrix.firstRow - Inclusive initial index of rows to receive input from the origin matrix.numberOfRows - Number of rows to receive input from the origin matrix.columnArray - Array of indices of columns to receive input from the origin matrix.origin - The matrix containing the subset of values to set to the elements of this matrix.ArgumentNullException - Thrown when columnArray or origin is null.ArgumentOutOfRangeException - Thrown when firstRow, or numberOfRows is less than 0.ArgumentException - Thrown when firstRow plus numberOfRows is greater than the row dimension of this matrix,
or when the row dimension of origin is not equal to numberOfRows,
or when the column dimension of origin is not equal to the length of columnArray,
or when columnArray contains values less than zero or greater than or equal to the column dimension of this matrix.public final void setMatrix(@Nonnull int[] rowArray, @Nonnull int[] columnArray, @Nonnull Matrix origin)
origin matrix.
The origin matrix must match the dimensions of the requested submatrix.rowArray - Array of indices of rows to receive input from the origin matrix.columnArray - Array of indices of columns to receive input from the origin matrix.origin - The matrix containing the subset of values to set to the elements of this matrix.ArgumentNullException - Thrown when rowArray, columnArray, or origin is null.ArgumentException - Thrown when the row dimension of origin is not equal to the length of rowArray,
or when the column dimension of origin is not equal to the length of columnArray,
or when rowArray contains values less than zero or greater than or equal to the row dimension of this matrix,
or when columnArray contains values less than zero or greater than or equal to the column dimension of this matrix.public final void setMatrix(@Nonnull int[] destinationRowArray, @Nonnull int[] destinationColumnArray, @Nonnull Matrix origin, @Nonnull int[] originRowArray, @Nonnull int[] originColumnArray)
origin matrix.
The origin matrix must match the dimensions of the requested submatrix.destinationRowArray - Array of indices of rows to receive input from the origin matrix.destinationColumnArray - Array of indices of columns to receive input from the origin matrix.origin - The matrix containing the subset of values to set to the elements of this matrix.originRowArray - Array of indices of rows to take input from the origin matrix.originColumnArray - Array of indices of columns to take input from the origin matrix.ArgumentNullException - Thrown when destinationRowArray, destinationColumnArray, origin,originRowArray, or originColumnArray is null.ArgumentException - Thrown when the length of destinationRowArray is not equal to the length of originRowArray,
or when the length of destinationColumnArray is not equal to the length of originColumnArray,
or when destinationRowArray contains values less than zero or greater than or equal to the row dimension of this matrix,
or when destinationColumnArray contains values less than zero or greater than or equal to the column dimension of this matrix,
or when originRowArray contains values less than zero or greater than or equal to the row dimension of origin,
or when originColumnArray contains values less than zero or greater than or equal to the column dimension of origin.public final int getRowDimension()
public final int getColumnDimension()
public abstract double get(int rowIndex,
int columnIndex)
rowIndex - The row index of the desired element.columnIndex - The column index of the desired element.ObjectFrozenException - Thrown when a set is attempted on a Matrix when
IsFrozen (get) is true.public abstract void set(int rowIndex,
int columnIndex,
double value)
rowIndex - The row index of the desired element.columnIndex - The column index of the desired element.ObjectFrozenException - Thrown when a set is attempted on a Matrix when
IsFrozen (get) is true.public static boolean equals(Matrix left, Matrix right)
left - The first matrix to compare.right - The second matrix to compare.true if the given matrices hold the same values; otherwise false.public static void addAssign(@Nonnull Matrix leftAddend, @Nonnull Matrix rightAddend, @Nonnull Matrix sum)
public static void subtractAssign(@Nonnull Matrix minuend, @Nonnull Matrix subtrahend, @Nonnull Matrix difference)
@Nonnull public static Matrix elementMultiply(@Nonnull Matrix multiplicand, @Nonnull Matrix multiplier)
Creates a new Matrix which is the element-by-element multiplication of
the two given matrices.
The most efficient operation to do this is chosen through double dispatch based on the concrete types of the given matrices.
@Nonnull public static Matrix elementMultiply(@Nonnull Matrix multiplicand, @Nonnull Matrix3By3 multiplier)
Matrix which is the element-by-element multiplication of
the two given matrices.multiplicand - The first Matrix to multiply.multiplier - The second Matrix3By3 to multiply.Matrix which equals the element multiplication of the two given matrices.@Nonnull public static Matrix elementMultiply(@Nonnull Matrix3By3 multiplicand, @Nonnull Matrix multiplier)
Matrix which is the element-by-element multiplication of
the two given matrices.multiplicand - The first Matrix3By3 to multiply.multiplier - The second Matrix to multiply.Matrix which equals the element multiplication of the two given matrices.@Nonnull public static Matrix elementMultiply(@Nonnull Matrix multiplicand, @Nonnull Matrix6By6 multiplier)
Matrix which is the element-by-element multiplication of
the two given matrices.multiplicand - The first Matrix to multiply.multiplier - The second Matrix6By6 to multiply.Matrix which equals the element multiplication of the two given matrices.@Nonnull public static Matrix elementMultiply(@Nonnull Matrix6By6 multiplicand, @Nonnull Matrix multiplier)
Matrix which is the element-by-element multiplication of
the two given matrices.multiplicand - The first Matrix6By6 to multiply.multiplier - The second Matrix to multiply.Matrix which equals the element multiplication of the two given matrices.public static void elementMultiplyAssign(@Nonnull Matrix multiplicand, @Nonnull Matrix multiplier, @Nonnull Matrix product)
Matrix to equal the element-wise multiplication
of the multiplicand times the multiplier.@Nonnull public static Matrix elementDivide(@Nonnull Matrix dividend, @Nonnull Matrix divisor)
Creates a new Matrix which is the element-by-element division of
the two given matrices.
The most efficient operation to do this is chosen through double dispatch based on the concrete types of the given matrices.
@Nonnull public static Matrix elementDivide(@Nonnull Matrix dividend, @Nonnull Matrix3By3 divisor)
Matrix which is the element-by-element division of
the two given matrices.dividend - The Matrix whose elements will form the numerators.divisor - The Matrix3By3 whose elements will form the denominators.Matrix which equals the element division of the two given matrices.@Nonnull public static Matrix elementDivide(@Nonnull Matrix3By3 dividend, @Nonnull Matrix divisor)
Matrix which is the element-by-element division of
the two given matrices.dividend - The Matrix3By3 whose elements will form the numerators.divisor - The Matrix whose elements will form the denominators.Matrix which equals the element division of the two given matrices.@Nonnull public static Matrix elementDivide(@Nonnull Matrix dividend, @Nonnull Matrix6By6 divisor)
Matrix which is the element-by-element division of
the two given matrices.dividend - The Matrix whose elements will form the numerators.divisor - The Matrix6By6 whose elements will form the denominators.Matrix which equals the element division of the two given matrices.@Nonnull public static Matrix elementDivide(@Nonnull Matrix6By6 dividend, @Nonnull Matrix divisor)
Matrix which is the element-by-element division of
the two given matrices.dividend - The Matrix6By6 whose elements will form the numerators.divisor - The Matrix whose elements will form the denominators.Matrix which equals the element division of the two given matrices.public static void elementDivideAssign(@Nonnull Matrix dividend, @Nonnull Matrix divisor, @Nonnull Matrix quotient)
public static void multiplyAssign(@Nonnull Matrix multiplicand, @Nonnull Matrix multiplier, @Nonnull Matrix product)
Matrix to equal the linear algebra multiplication
of the multiplicand times the multiplier.public static Matrix add(Matrix leftAddend, Matrix rightAddend)
Creates a Matrix which is the sum of the two given matrices.
The most efficient operation to do this is chosen through double dispatch based on the concrete types of the given matrices.
public static Matrix add(Matrix leftAddend, @Nonnull Matrix3By3 rightAddend)
Matrix which is the sum of the two given matrices.leftAddend - The first Matrix to sum.rightAddend - The second Matrix3By3 to sum.Matrix which is the sum of the two given matrices and the given matrixpublic static Matrix add(@Nonnull Matrix3By3 leftAddend, Matrix rightAddend)
Matrix which is the sum of the two given matrices.leftAddend - The first Matrix3By3 to sum.rightAddend - The second Matrix to sum.Matrix which is the sum of the two given matrices and the given matrixpublic static Matrix add(Matrix leftAddend, Matrix6By6 rightAddend)
Matrix which is the sum of the two given matrices.leftAddend - The first Matrix to sum.rightAddend - The second Matrix6By6 to sum.Matrix which is the sum of the two given matrices and the given matrixpublic static Matrix add(Matrix6By6 left, Matrix rightAddend)
Matrix which is the sum of the two given matrices.left - The first Matrix6By6 to sum.rightAddend - The second Matrix to sum.Matrix which is the sum of the two given matrices and the given matrixpublic static Matrix subtract(Matrix minuend, Matrix subtrahend)
Creates a Matrix whose elements have the values of the elements of the minuend matrix
subtracted by the elements of the subtrahend matrix.
The most efficient operation to do this is chosen through double dispatch based on the concrete types of the given matrices.
public static Matrix subtract(Matrix minuend, @Nonnull Matrix3By3 subtrahend)
Matrix whose elements have the values of the elements of the minuend matrix
subtracted by the elements of the subtrahend matrix.minuend - The Matrix being subtracted from.subtrahend - The Matrix3By3 to subtract.Matrix which is the subtraction of the two given matrices.public static Matrix subtract(@Nonnull Matrix3By3 minuend, Matrix subtrahend)
Matrix whose elements have the values of the elements of the minuend matrix
subtracted by the elements of the subtrahend matrix.minuend - The Matrix3By3 being subtracted from.subtrahend - The Matrix to subtract.Matrix which is the subtraction of the two given matrices.public static Matrix subtract(Matrix minuend, Matrix6By6 subtrahend)
Matrix whose elements have the values of the elements of the minuend matrix
subtracted by the elements of the subtrahend matrix.minuend - The Matrix being subtracted from.subtrahend - The Matrix6By6 to subtract.Matrix which is the subtraction of the two given matrices.public static Matrix subtract(Matrix6By6 minuend, Matrix subtrahend)
Matrix whose elements have the values of the elements of the minuend matrix
subtracted by the elements of the subtrahend matrix.minuend - The Matrix6By6 being subtracted from.subtrahend - The Matrix to subtract.Matrix which is the subtraction of the two given matrices.public static Matrix multiply(Matrix multiplicand, Matrix multiplier)
Creates a Matrix which is the linear algebra multiplication of
the two given matrices.
The most efficient operation to do this is chosen through double dispatch based on the concrete types of the given matrices.
public static Matrix multiply(Matrix multiplicand, @Nonnull Matrix3By3 multiplier)
Creates a Matrix which is the linear algebra multiplication of
the two given matrices.
multiplicand - The first Matrix to multiply.multiplier - The second Matrix3By3 to multiply.Matrix which is the multiplication of this matrix and the given matrix.public static Matrix multiply(@Nonnull Matrix3By3 multiplicand, Matrix multiplier)
Creates a Matrix which is the linear algebra multiplication of
the two given matrices.
multiplicand - The first Matrix3By3 to multiply.multiplier - The second Matrix to multiply.Matrix which is the multiplication of this matrix and the given matrix.public static Matrix multiply(Matrix multiplicand, Matrix6By6 multiplier)
Creates a Matrix which is the linear algebra multiplication of
the two given matrices.
multiplicand - The first Matrix to multiply.multiplier - The second Matrix6By6 to multiply.Matrix which is the multiplication of this matrix and the given matrix.public static Matrix multiply(Matrix6By6 multiplicand, Matrix multiplier)
Creates a Matrix which is the linear algebra multiplication of
the two given matrices.
multiplicand - The first Matrix6By6 to multiply.multiplier - The second Matrix to multiply.Matrix which is the multiplication of this matrix and the given matrix.public static Matrix multiply(double factor, Matrix matrix)
Matrix which has the value of the given matrix multiplied by the given factor.factor - The 'scalar' to multiply by the given matrix.matrix - The matrix to be multiplied by the given factor.public static Matrix multiply(Matrix matrix, double factor)
Matrix which has the value of the given matrix multiplied by the given factor.matrix - The matrix to be multiplied by the given factor.factor - The 'scalar' to multiply by the given matrix.