public interface Matrix extends MatrixTable, MatrixRing, DeepCopyable
Matrix
as a Ring
, a Table
, and a few more methods not already defined in its mathematical definition.
The interface is made minimal to avoid listing all possible matrix operations.
Instead, matrix operations are grouped into packages and classes by their properties.
This is to avoid interface "pollution", lengthy and cumbersome design.Modifier and Type | Method and Description |
---|---|
Matrix |
deepCopy()
The implementation returns an instance created from
this by the copy
constructor of the class, or just this if the instance itself is
immutable. |
Vector |
getColumn(int j)
Get the specified column in the matrix as a vector.
|
Vector |
getRow(int i)
Get the specified row in the matrix as a vector.
|
Vector |
multiply(Vector v)
Right multiply this matrix, A, by a vector.
|
Matrix |
scaled(double c)
Scale this matrix, A, by a constant.
|
get, set
Vector multiply(Vector v)
v
- a vectorMatrix scaled(double c)
c
- a doubleVector getRow(int i) throws MatrixAccessException
i
- the row indexMatrixAccessException
- when i < 1, or when i > the number of rowsVector getColumn(int j) throws MatrixAccessException
j
- the column indexMatrixAccessException
- when j < 1, or when j > the number of columnsMatrix deepCopy()
DeepCopyable
this
by the copy
constructor of the class, or just this
if the instance itself is
immutable.deepCopy
in interface DeepCopyable
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.