|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DenseMatrix
General interface for dense matrices.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface maspack.matrix.Matrix |
---|
Matrix.Partition, Matrix.WriteFormat |
Field Summary |
---|
Fields inherited from interface maspack.matrix.Matrix |
---|
INDEFINITE, POSITIVE_DEFINITE, SPD, SYMMETRIC |
Method Summary | |
---|---|
void |
set(double[] values)
Sets the elements of this matrix from an array of doubles. |
void |
set(int i,
int j,
double value)
Sets a single element of this matrix. |
void |
set(Vector v)
Sets the size and values of this matrix to correspond to those of vector object. |
void |
setColumn(int j,
double[] values)
Sets a column of this matrix from an array of doubles. |
void |
setColumn(int j,
Vector v)
Sets a column of this matrix from a Vector . |
void |
setRow(int i,
double[] values)
Set a row of this matrix from an array of doubles. |
void |
setRow(int i,
Vector v)
Sets a row of this matrix from a Vector . |
void |
setSubMatrix(int baseRow,
int baseCol,
Matrix Msrc)
Sets a submatrix of this matrix object. |
Methods inherited from interface maspack.matrix.Matrix |
---|
checkConsistency, colSize, determinant, epsilonEquals, equals, frobeniusNorm, get, get, getCCSIndices, getCCSIndices, getCCSValues, getCCSValues, getColumn, getColumn, getColumn, getCRSIndices, getCRSIndices, getCRSValues, getCRSValues, getRow, getRow, getRow, getSize, getSubMatrix, infinityNorm, isFixedSize, isSymmetric, mul, mul, mul, mulAdd, mulAdd, mulAdd, mulTranspose, mulTranspose, mulTranspose, mulTransposeAdd, mulTransposeAdd, mulTransposeAdd, numNonZeroVals, numNonZeroVals, oneNorm, rowSize, scan, set, set, setCCSValues, setCRSValues, setSize, toString, trace, write, write, write |
Method Detail |
---|
void set(int i, int j, double value)
i
- element row indexj
- element column indexvalue
- element valuevoid set(Vector v)
v
- vector whose size and values are copied
ImproperSizeException
- if this matrix cannot be resized to correspond to the dimensions of the
vectorvoid set(double[] values)
(i,j)
is stored at location i*colSize()+j
.
values
- array from which values are copiedvoid setSubMatrix(int baseRow, int baseCol, Matrix Msrc) throws ImproperSizeException
baseRow
and baseCol
,
and the new values are given by the matrix object Msrc
.
The size of the submatrix is determined by the dimensions of
Msrc
.
baseRow
- index of the first row of the submatrixbaseCol
- index of the first column of the submatrixMsrc
- new values for the submatrix.
ImproperSizeException
- if baseRow
or baseCol
are negative, or if
the submatrix exceeds the current matrix boundsMatrixNd.copySubMatrix(int, int, int, int, maspack.matrix.Matrix, int, int)
void setColumn(int j, double[] values)
j
- column indexvalues
- array from which column values are copiedvoid setRow(int i, double[] values)
i
- row indexvalues
- array from which the row is copiedvoid setColumn(int j, Vector v)
Vector
.
j
- column indexv
- vector from which the column is copied
ImproperSizeException
- vector's size not equal to the number of matrix rowsvoid setRow(int i, Vector v)
Vector
.
i
- row indexv
- vector from which the row is copied
ImproperSizeException
- vector's size not equal to the number of matrix columns
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |