|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.numericalmethod.suanshu.matrix.doubles.matrixtype.dense.triangle.LowerTriangularMatrix
public class LowerTriangularMatrix
A lower triangular matrix has 0 entries where column index > row index. A lower triangular matrix is always square.
| Constructor Summary | |
|---|---|
LowerTriangularMatrix(double[][] data)
Construct a lower triangular matrix from a 2D double[][] array. |
|
LowerTriangularMatrix(int dim)
Construct a lower triangular matrix of dimension dim * dim. |
|
LowerTriangularMatrix(LowerTriangularMatrix L)
Copy constructor. |
|
LowerTriangularMatrix(Matrix A)
Construct a lower triangular matrix from a matrix. |
|
| Method Summary | |
|---|---|
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(java.lang.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()
Get the number of columns. |
int |
nRows()
Get 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. |
java.lang.String |
toString()
|
LowerTriangularMatrix |
ZERO()
Get a zero matrix that has the same dimension as this matrix. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LowerTriangularMatrix(int dim)
dim - the matrix dimensionpublic LowerTriangularMatrix(double[][] data)
double[][] array.
data - the 2D array input
java.lang.IllegalArgumentException - when the input data is not a lower triangularpublic LowerTriangularMatrix(Matrix A)
A - a matrix
java.lang.IllegalArgumentException - when A is not squarepublic LowerTriangularMatrix(LowerTriangularMatrix L)
L - a lower triangular matrix| Method Detail |
|---|
public LowerTriangularMatrix deepCopy()
DeepCopyablethis by the copy
constructor of the class, or just this if the instance itself is
immutable.
deepCopy in interface DeepCopyabledeepCopy in interface Matrixpublic DenseMatrix toDense()
DensifiableDenseMatrix.
toDense in interface DensifiableDenseMatrixpublic int nRows()
Table
nRows in interface Tablepublic int nCols()
Table
nCols in interface Table
public void set(int i,
int j,
double value)
throws MatrixAccessException
MatrixAccess
set in interface MatrixAccessi - the row indexj - the column indexvalue - the value to set A[i,j] to
MatrixAccessException - if i or j is out of range
public double get(int i,
int j)
throws MatrixAccessException
MatrixAccess
get in interface MatrixAccessi - the row indexj - the column index
MatrixAccessException - if i or j is out of rangepublic Vector getRow(int i)
Matrix
getRow in interface Matrixi - the row index
public Vector getColumn(int j)
Matrix
getColumn in interface Matrixj - the column index
public Matrix add(Matrix that)
MatrixRing
add in interface AbelianGroup<Matrix>add in interface MatrixRingthat - a matrix
this and thatpublic Matrix minus(Matrix that)
MatrixRing
minus in interface AbelianGroup<Matrix>minus in interface MatrixRingthat - a matrix
this and thatpublic Matrix multiply(Matrix that)
MatrixRing
multiply in interface Monoid<Matrix>multiply in interface MatrixRingthat - a matrix
this and thatpublic UpperTriangularMatrix t()
t(A)
t in interface MatrixRingthispublic LowerTriangularMatrix scaled(double scalar)
Matrix
scaled in interface Matrixscalar - a double
public LowerTriangularMatrix opposite()
MatrixRing
opposite in interface AbelianGroup<Matrix>opposite in interface MatrixRingpublic Vector multiply(Vector v)
Matrix
multiply in interface Matrixv - a vector
public LowerTriangularMatrix ZERO()
MatrixRing
ZERO in interface AbelianGroup<Matrix>ZERO in interface MatrixRingpublic LowerTriangularMatrix ONE()
MatrixRing
ONE in interface Monoid<Matrix>ONE in interface MatrixRingpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||