public class LowerTriangularMatrix extends Object implements Matrix, Densifiable
| Constructor and Description |
|---|
LowerTriangularMatrix(double[][] data)
Constructs a lower triangular matrix from a 2D
double[][] array. |
LowerTriangularMatrix(int dim)
Constructs a lower triangular matrix of dimension dim * dim.
|
LowerTriangularMatrix(LowerTriangularMatrix L)
Copy constructor.
|
LowerTriangularMatrix(Matrix A)
Constructs a lower triangular matrix from a matrix.
|
| Modifier and Type | Method and Description |
|---|---|
Matrix |
add(Matrix that)
this + that
|
LowerTriangularMatrix |
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. |
boolean |
equals(Object obj) |
double |
get(int i,
int j)
Get the matrix entry at [i,j].
|
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.
|
int |
hashCode() |
Matrix |
minus(Matrix that)
this - that
|
Matrix |
multiply(Matrix that)
this * that
|
Vector |
multiply(Vector v)
Right multiply this matrix, A, by a vector.
|
int |
nCols()
Gets the number of columns.
|
int |
nRows()
Gets the number of rows.
|
LowerTriangularMatrix |
ONE()
Get an identity matrix that has the same dimension as this matrix.
|
LowerTriangularMatrix |
opposite()
Get the opposite of this matrix.
|
LowerTriangularMatrix |
scaled(double scalar)
Scale this matrix, A, by a constant.
|
void |
set(int i,
int j,
double value)
Set the matrix entry at [i,j] to a value.
|
UpperTriangularMatrix |
t()
t(A) |
DenseMatrix |
toDense()
Densify a matrix, i.e., convert a matrix implementation to the standard dense matrix,
DenseMatrix. |
String |
toString() |
LowerTriangularMatrix |
ZERO()
Get a zero matrix that has the same dimension as this matrix.
|
public LowerTriangularMatrix(int dim)
dim - the matrix dimensionpublic LowerTriangularMatrix(double[][] data)
double[][] array.data - the 2D array inputIllegalArgumentException - when the input data is not a lower triangularpublic LowerTriangularMatrix(Matrix A)
A - a matrixIllegalArgumentException - when A is not squarepublic LowerTriangularMatrix(LowerTriangularMatrix L)
L - a lower triangular matrixpublic LowerTriangularMatrix deepCopy()
DeepCopyablethis by the copy
constructor of the class, or just this if the instance itself is
immutable.deepCopy in interface MatrixdeepCopy in interface DeepCopyablepublic DenseMatrix toDense()
DensifiableDenseMatrix.toDense in interface DensifiableDenseMatrixpublic int nRows()
Tablepublic int nCols()
Tablepublic void set(int i,
int j,
double value)
throws MatrixAccessException
MatrixAccessset in interface MatrixAccessi - the row indexj - the column indexvalue - the value to set A[i,j] toMatrixAccessException - if i or j is out of rangepublic double get(int i,
int j)
throws MatrixAccessException
MatrixAccessget in interface MatrixAccessi - the row indexj - the column indexMatrixAccessException - if i or j is out of rangepublic Vector getRow(int i)
Matrixpublic Vector getColumn(int j)
Matrixpublic Matrix add(Matrix that)
MatrixRingadd in interface MatrixRingadd in interface AbelianGroup<Matrix>that - a matrixthis and thatpublic Matrix minus(Matrix that)
MatrixRingminus in interface MatrixRingminus in interface AbelianGroup<Matrix>that - a matrixthis and thatpublic Matrix multiply(Matrix that)
MatrixRingmultiply in interface MatrixRingmultiply in interface Monoid<Matrix>that - a matrixthis and thatpublic UpperTriangularMatrix t()
t(A)t in interface MatrixRingthispublic LowerTriangularMatrix scaled(double scalar)
Matrixpublic LowerTriangularMatrix opposite()
MatrixRingopposite in interface MatrixRingopposite in interface AbelianGroup<Matrix>public Vector multiply(Vector v)
Matrixpublic LowerTriangularMatrix ZERO()
MatrixRingZERO in interface MatrixRingZERO in interface AbelianGroup<Matrix>public LowerTriangularMatrix ONE()
MatrixRingONE in interface MatrixRingONE in interface Monoid<Matrix>Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.