Interface MatrixMathOperation
-
- All Known Implementing Classes:
AutoParallelMatrixMathOperation
,SimpleMatrixMathOperation
public interface MatrixMathOperation
This interface defines some standard operations for generic matrices. An implementation of such provides a default implementation of certain matrix definitions. Moreover, it allows these definitions to change to another implementation easily. Note that the return type of the operations is the generalMatrix
interface. An implementation can override these return types.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Matrix
add(MatrixAccess A1, MatrixAccess A2)
A1 + A2Matrix
minus(MatrixAccess A1, MatrixAccess A2)
A1 - A2Matrix
multiply(MatrixAccess A1, MatrixAccess A2)
A1 * A2Vector
multiply(MatrixAccess A, Vector v)
A * vMatrix
scaled(MatrixAccess A, double c)
c * AMatrix
transpose(MatrixAccess A)
Get the transpose of A.
-
-
-
Method Detail
-
add
Matrix add(MatrixAccess A1, MatrixAccess A2)
A1 + A2- Parameters:
A1
- a matrixA2
- a matrix- Returns:
- the sum of A1 and A2
-
minus
Matrix minus(MatrixAccess A1, MatrixAccess A2)
A1 - A2- Parameters:
A1
- a matrixA2
- a matrix- Returns:
- the difference between A1 and A2
-
multiply
Matrix multiply(MatrixAccess A1, MatrixAccess A2)
A1 * A2- Parameters:
A1
- a matrixA2
- a matrix- Returns:
- the product of A1 and A2
-
multiply
Vector multiply(MatrixAccess A, Vector v)
A * v- Parameters:
A
- a matrixv
- a vector- Returns:
- the product of A and v
-
scaled
Matrix scaled(MatrixAccess A, double c)
c * A- Parameters:
A
- a matrixc
- a scalar- Returns:
- A scaled by c
-
transpose
Matrix transpose(MatrixAccess A)
Get the transpose of A.- Parameters:
A
- a matrix- Returns:
- the transpose of A
-
-