public interface PdMatrixIf
Beta version.
PdMatrix
,
PnSparseMatrix
Modifier and Type | Method and Description |
---|---|
void |
addEntry(int i,
int j,
double inc)
Add value to component of matrix, and possibly enlarge matrix if too small.
|
void |
clear()
Set all elements of the matrix to 0.
|
double |
getEntry(int i,
int j)
Get the component of matrix.
|
int |
getNumCols()
Get number of columns of matrix.
|
int |
getNumRows()
Get number of rows of matrix.
|
boolean |
isSquare()
Check if matrix is square.
|
PdVector |
leftMultMatrix(PdVector out,
PdVector in)
Multiply this matrix with vector and fill output vector,
out = this*in. |
double |
multQuadratic(PdVector left,
PdVector right)
Compute
left^T*this*right . |
void |
multScalar(double scalar)
Multiply all matrix components with scalar.
|
PdVector |
rightMultMatrix(PdVector out,
PdVector in)
Multiply this matrix with vector and fill output vector,
out = in*this. |
void |
setEntry(int i,
int j,
double value)
Assign value to component of matrix, and possibly enlarge matrix if too small.
|
void |
transpose()
Transpose a square matrix,
this = transpose(this) . |
int getNumCols()
int getNumRows()
double getEntry(int i, int j)
void setEntry(int i, int j, double value)
void addEntry(int i, int j, double inc)
void multScalar(double scalar)
PdVector leftMultMatrix(PdVector out, PdVector in)
out = this*in.
.
Matrix need not be square.
Input vector must have same size as number of columns of this matrix.
Method modifies size of output vector to number of rows of this matrix.
If output vector is null then it is created.PdVector rightMultMatrix(PdVector out, PdVector in)
out = in*this.
.
Matrix need not be square.
Input vector must have same size as number of rows of this matrix.
Method modifies size of output vector to number of columns of this matrix.
If output vector is null then it is created.double multQuadratic(PdVector left, PdVector right)
left^T*this*right
. The matrix is interpreted as a quadratic form.left
- The left argument.right
- The right argument.left^T*this*right
.boolean isSquare()
void transpose()
this = transpose(this)
.void clear()
"