maspack.matrix
Interface DenseMatrix

All Superinterfaces:
LinearTransformNd, Matrix
All Known Subinterfaces:
MatrixBlock
All Known Implementing Classes:
AffineTransform2d, AffineTransform2dBase, AffineTransform3d, AffineTransform3dBase, DenseMatrixBase, FrameBlock, Matrix1x1, Matrix1x1Block, Matrix1x3, Matrix1x3Block, Matrix1x6, Matrix1x6Block, Matrix2d, Matrix2dBase, Matrix2x2Block, Matrix2x3, Matrix2x3Block, Matrix2x6, Matrix2x6Block, Matrix3d, Matrix3dBase, Matrix3x1, Matrix3x1Block, Matrix3x2, Matrix3x2Block, Matrix3x3Block, Matrix3x3DiagBlock, Matrix3x4, Matrix3x4Block, Matrix3x6, Matrix3x6Block, Matrix4d, Matrix4dBase, Matrix4x3, Matrix4x3Block, Matrix6d, Matrix6dBase, Matrix6dBlock, Matrix6x1, Matrix6x1Block, Matrix6x2, Matrix6x2Block, Matrix6x3, Matrix6x3Block, MatrixBlockBase, MatrixNd, MatrixNdBlock, RigidTransform2d, RigidTransform3d, RotationMatrix2d, RotationMatrix3d, ScaledRigidTransform3d, SpatialInertia, SubMatrixNd, SymmetricMatrix3d

public interface DenseMatrix
extends Matrix

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

set

void set(int i,
         int j,
         double value)
Sets a single element of this matrix.

Parameters:
i - element row index
j - element column index
value - element value

set

void set(Vector v)
Sets the size and values of this matrix to correspond to those of vector object.

Parameters:
v - vector whose size and values are copied
Throws:
ImproperSizeException - if this matrix cannot be resized to correspond to the dimensions of the vector

set

void set(double[] values)
Sets the elements of this matrix from an array of doubles. The elements in the array should be stored using row-major order, so that element (i,j) is stored at location i*colSize()+j.

Parameters:
values - array from which values are copied

setSubMatrix

void setSubMatrix(int baseRow,
                  int baseCol,
                  Matrix Msrc)
                  throws ImproperSizeException
Sets a submatrix of this matrix object. The first row and column of the submatrix are given by 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.

Parameters:
baseRow - index of the first row of the submatrix
baseCol - index of the first column of the submatrix
Msrc - new values for the submatrix.
Throws:
ImproperSizeException - if baseRow or baseCol are negative, or if the submatrix exceeds the current matrix bounds
See Also:
MatrixNd.copySubMatrix(int, int, int, int, maspack.matrix.Matrix, int, int)

setColumn

void setColumn(int j,
               double[] values)
Sets a column of this matrix from an array of doubles.

Parameters:
j - column index
values - array from which column values are copied

setRow

void setRow(int i,
            double[] values)
Set a row of this matrix from an array of doubles.

Parameters:
i - row index
values - array from which the row is copied

setColumn

void setColumn(int j,
               Vector v)
Sets a column of this matrix from a Vector.

Parameters:
j - column index
v - vector from which the column is copied
Throws:
ImproperSizeException - vector's size not equal to the number of matrix rows

setRow

void setRow(int i,
            Vector v)
Sets a row of this matrix from a Vector.

Parameters:
i - row index
v - vector from which the row is copied
Throws:
ImproperSizeException - vector's size not equal to the number of matrix columns