|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmaspack.matrix.MatrixBase
maspack.matrix.DenseMatrixBase
maspack.matrix.Matrix3x1
public class Matrix3x1
Implements a 3 x 1 matrix.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface maspack.matrix.Matrix |
---|
Matrix.Partition, Matrix.WriteFormat |
Field Summary | |
---|---|
double |
m00
|
double |
m10
|
double |
m20
|
static Matrix3x1 |
ZERO
Global zero matrix. |
Fields inherited from interface maspack.matrix.Matrix |
---|
INDEFINITE, POSITIVE_DEFINITE, SPD, SYMMETRIC |
Constructor Summary | |
---|---|
Matrix3x1()
Creates a new Matrix3x1. |
Method Summary | |
---|---|
void |
add(Matrix M)
Adds this matrix to M and places the result in this matrix. |
void |
add(Matrix3x1 M)
Adds the contents of a Matrix3x1 to this matrix block. |
Matrix3x1 |
clone()
Creates a clone of this matrix. |
int |
colSize()
Number of columns in the matrix associated with this transformation. |
double |
dot(Vector3d v)
Forms the dot product of this Matrix3x1 with a vector. |
double |
get(int i,
int j)
Gets a single element of this matrix. |
void |
get(Vector3d v)
Gets the contents of this Matrix3x1 into a Vector3d. |
static void |
mulScaledTransposeRightAdd(Matrix3d MR,
double s,
Matrix3x1 M1,
Matrix3x1 M2)
Computes |
int |
rowSize()
Number of rows in the matrix associated with this transformation. |
void |
scale(double s)
Scales the elements of this matrix by s . |
void |
scale(double s,
Vector3d v1)
Scales the elements of vector v1 by s and places the
results in this vector. |
void |
scaledAdd(double s,
Matrix M)
Scales the matrix M and add the result to this matrix. |
void |
scaledAdd(double s,
Matrix3x1 M)
Adds the scaled contents of a Matrix3x1 to this matrix block. |
void |
scaledAdd(double s,
Vector3d v1)
Computes s v1 and adds the result to this matrix. |
void |
set(int i,
int j,
double value)
Sets a single element of this matrix. |
void |
set(Matrix M)
Sets the size and values of this matrix to those of another matrix. |
void |
set(Matrix3x1 M)
Sets the contents of this Matrix3x1 to those of a specified block. |
void |
set(Vector3d v)
Sets the contents of this Matrix3x1 from a Vector3d. |
void |
setZero()
Sets the elements of this matrix to zero. |
void |
sub(Matrix M)
Subtracts this matrix from M and places the result in this matrix. |
void |
sub(Matrix3x1 M)
Subtracts the contents of a Matrix3x1 from this matrix block. |
java.lang.String |
transposeToString()
|
java.lang.String |
transposeToString(NumberFormat fmt)
|
java.lang.String |
transposeToString(java.lang.String fmtStr)
|
Methods inherited from class maspack.matrix.DenseMatrixBase |
---|
add, checkConsistency, set, set, set, set, setCCSValues, setColumn, setColumn, setCRSValues, setRow, setRow, setSubMatrix |
Methods inherited from class maspack.matrix.MatrixBase |
---|
containsNaN, determinant, epsilonEquals, equals, frobeniusNorm, get, get, getCCSIndices, getCCSIndices, getCCSValues, getCCSValues, getColumn, getColumn, getColumn, getCRSIndices, getCRSIndices, getCRSValues, getCRSValues, getDefaultFormat, getRow, getRow, getRow, getSize, getSubMatrix, hasNaN, idString, infinityNorm, isFixedSize, isSymmetric, mul, mul, mul, mulAdd, mulAdd, mulAdd, mulTranspose, mulTranspose, mulTranspose, mulTransposeAdd, mulTransposeAdd, mulTransposeAdd, numNonZeroVals, numNonZeroVals, oneNorm, scan, setCRSValues, setDefaultFormat, setSize, toString, toString, toString, trace, write, write, write, write, write, writeToFile |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface maspack.matrix.Matrix |
---|
determinant, epsilonEquals, equals, frobeniusNorm, 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, scan, setSize, toString, trace, write, write, write |
Field Detail |
---|
public double m00
public double m10
public double m20
public static final Matrix3x1 ZERO
Constructor Detail |
---|
public Matrix3x1()
Method Detail |
---|
public int rowSize()
mul
.
rowSize
in interface LinearTransformNd
rowSize
in interface Matrix
rowSize
in class MatrixBase
public int colSize()
mul
.
colSize
in interface LinearTransformNd
colSize
in interface Matrix
colSize
in class MatrixBase
public double get(int i, int j)
get
in interface Matrix
get
in class MatrixBase
i
- element row indexj
- element column index
public void get(Vector3d v)
v
- vector to return contents inpublic void set(int i, int j, double value)
set
in interface DenseMatrix
set
in class DenseMatrixBase
i
- element row indexj
- element column indexvalue
- element valuepublic void setZero()
public void set(Matrix M)
DenseMatrixBase
set
in interface Matrix
set
in class DenseMatrixBase
M
- matrix whose size and values are copiedpublic void set(Matrix3x1 M)
M
- matrix block providing new valuespublic void set(Vector3d v)
v
- vector providing new valuespublic void scale(double s)
s
.
s
- scaling factorpublic void scale(double s, Vector3d v1)
s
and places the
results in this vector.
s
- scaling factorv1
- vector to be scaledpublic void scaledAdd(double s, Vector3d v1)
s v1
and adds the result to this matrix.
s
- scaling factorv1
- vector to be scaledpublic void add(Matrix M)
M
- right-hand matrix
ImproperSizeException
- if this matrix and M have different sizespublic void scaledAdd(double s, Matrix M)
s
- scaling factorM
- matrix to be scaled and added
ImproperSizeException
- if this matrix and M have different sizespublic void add(Matrix3x1 M)
M
- matrix block to addpublic void scaledAdd(double s, Matrix3x1 M)
M
- matrix block to addpublic void sub(Matrix M)
M
- right-hand matrix
ImproperSizeException
- if this matrix and M have different sizespublic void sub(Matrix3x1 M)
M
- matrix block to subtractpublic double dot(Vector3d v)
v
- vector to take dot product withpublic static void mulScaledTransposeRightAdd(Matrix3d MR, double s, Matrix3x1 M1, Matrix3x1 M2)
s M1 * M2^T
and adds the result to matrix MR.
MR
- matrix to add result tos
- scale valueM1
- left matrixM2
- right matrix transposepublic java.lang.String transposeToString()
public java.lang.String transposeToString(java.lang.String fmtStr)
public java.lang.String transposeToString(NumberFormat fmt)
public Matrix3x1 clone()
clone
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |