|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.aliasi.matrix.AbstractMatrix
com.aliasi.matrix.DenseMatrix
public class DenseMatrix
A DenseMatrix is a matrix implementation suitable for
matrices with primarily non-zero values. The dimensionality of a
dense matrix is set at construction time and immutable afterwards.
Values may be specified at construction time or given default
values; they are mutable and may be reset after construction.
Implementation Note: A dense matrix represents the values with a two-dimensional array of primitive double values.
| Constructor Summary | |
|---|---|
DenseMatrix(double[][] values)
Construct a dense matrix with the specified values. |
|
DenseMatrix(int numRows,
int numColumns)
Construct a dense matrix with the specified positive number of rows and columns. |
|
| Method Summary | |
|---|---|
int |
numColumns()
Returns the number of columns in the matrix. |
int |
numRows()
Returns the number of rows in the matrix. |
void |
setValue(int row,
int column,
double value)
Throw an unsupported operation exception. |
double |
value(int row,
int column)
Returns the value in the matrix at the specified row and column. |
| Methods inherited from class com.aliasi.matrix.AbstractMatrix |
|---|
columnVector, equals, hashCode, rowVector |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DenseMatrix(int numRows,
int numColumns)
0.0.
numRows - Number of rows for this matrix.numColumns - Number of columns for this matrix.
IllegalArgumentException - If either the number of rows or
columns is not positive.public DenseMatrix(double[][] values)
0.0.
All labels are initialized to null.
values - Two-dimensional array of values on which to base
this matrix.
IllegalArgumentException - If the either dimension of
the values array is 0.| Method Detail |
|---|
public final int numRows()
Matrix
numRows in interface MatrixnumRows in class AbstractMatrixpublic final int numColumns()
Matrix
numColumns in interface MatrixnumColumns in class AbstractMatrix
public double value(int row,
int column)
Matrix
value in interface Matrixvalue in class AbstractMatrixrow - The specified row.column - The specified column.
public void setValue(int row,
int column,
double value)
AbstractMatrix
setValue in interface MatrixsetValue in class AbstractMatrixrow - Ignored.column - Ignored.value - Ignored.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||