|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.northwestern.at.utils.math.matrix.AbstractMatrix edu.northwestern.at.utils.math.matrix.DenseMatrix
public class DenseMatrix
Implements a matrix as a dense two-dimensional array of doubles.
Field Summary | |
---|---|
protected double[][] |
matrixData
The matrix contents as a two-dimensional array of doubles. |
Fields inherited from class edu.northwestern.at.utils.math.matrix.AbstractMatrix |
---|
columns, rows |
Constructor Summary | |
---|---|
protected |
DenseMatrix()
Don't allow instantiation without size specification. |
|
DenseMatrix(int rows,
int columns)
Create a matrix of the specified size. |
Method Summary | |
---|---|
double |
get(int row,
int column)
Gets value of element at given row and column. |
void |
set(int row,
int column,
double value)
Set an element at the given position to a new value. |
Methods inherited from class edu.northwestern.at.utils.math.matrix.AbstractMatrix |
---|
columns, get, getColumn, getColumnData, getColumns, getColumns, getCopy, getRow, getRowData, getRows, getRows, getSubMatrix, getSubMatrix, getSubMatrix, getSubMatrix, rows, set, set, setColumn, setColumnData, setColumnData, setRow, setRowData, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface edu.northwestern.at.utils.math.matrix.Matrix |
---|
columns, get, getColumn, getColumnData, getColumns, getColumns, getCopy, getRow, getRowData, getRows, getRows, getSubMatrix, getSubMatrix, getSubMatrix, getSubMatrix, rows, set, set, setColumn, setColumnData, setColumnData, setRow, setRowData, toString |
Field Detail |
---|
protected double[][] matrixData
Constructor Detail |
---|
protected DenseMatrix()
public DenseMatrix(int rows, int columns)
rows
- Number of rows.columns
- Number of columns.
Each element of the result matrix will be set to zero.
Method Detail |
---|
public void set(int row, int column, double value)
set
in interface Matrix
set
in class AbstractMatrix
row
- Row in which the element occurs.column
- Column in which the element occurs.value
- The new value to be set. public double get(int row, int column)
get
in interface Matrix
get
in class AbstractMatrix
row
- Row in which the element occurs.column
- Column in which the element occurs.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |