# SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.algebra.linear.matrix.doubles.matrixtype.mathoperation

## 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 general Matrix interface. An implementation can override these return types.
• ### Method Summary

All Methods
Modifier and Type Method and Description
Matrix add(MatrixAccess A1, MatrixAccess A2)
A1 + A2
Matrix minus(MatrixAccess A1, MatrixAccess A2)
A1 - A2
Matrix multiply(MatrixAccess A1, MatrixAccess A2)
A1 * A2
Vector multiply(MatrixAccess A, Vector v)
A * v
Matrix scaled(MatrixAccess A, double c)
c * A
Matrix transpose(MatrixAccess A)
Get the transpose of A.
• ### Method Detail

• #### add

Matrix add(MatrixAccess A1,
MatrixAccess A2)
A1 + A2
Parameters:
A1 - a matrix
A2 - a matrix
Returns:
the sum of A1 and A2
• #### minus

Matrix minus(MatrixAccess A1,
MatrixAccess A2)
A1 - A2
Parameters:
A1 - a matrix
A2 - a matrix
Returns:
the difference between A1 and A2
• #### multiply

Matrix multiply(MatrixAccess A1,
MatrixAccess A2)
A1 * A2
Parameters:
A1 - a matrix
A2 - a matrix
Returns:
the product of A1 and A2
• #### multiply

Vector multiply(MatrixAccess A,
Vector v)
A * v
Parameters:
A - a matrix
v - a vector
Returns:
the product of A and v
• #### scaled

Matrix scaled(MatrixAccess A,
double c)
c * A
Parameters:
A - a matrix
c - 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

Copyright © 2010-2018 Numerical Method Incorporation Limited. All Rights Reserved.