public class Matrix6d extends Matrix6dBase implements VectorObject<Matrix6d>
Matrix.Partition, Matrix.WriteFormat| Modifier and Type | Field and Description |
|---|---|
static Matrix6d |
ZERO
Global zero matrix.
|
m00, m01, m02, m03, m04, m05, m10, m11, m12, m13, m14, m15, m20, m21, m22, m23, m24, m25, m30, m31, m32, m33, m34, m35, m40, m41, m42, m43, m44, m45, m50, m51, m52, m53, m54, m55INDEFINITE, POSITIVE_DEFINITE, SPD, SYMMETRIC| Constructor and Description |
|---|
Matrix6d()
Creates a matrix and initializes it to zero.
|
Matrix6d(double[] vals)
Creates a matrix and initializes its elements from an array of values.
|
Matrix6d(Matrix M)
Creates a matrix and initializes its elements to those of the matrix M.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Matrix6dBase M1)
Adds this matrix to M1 and places the result in this matrix.
|
void |
add(Matrix6dBase M1,
Matrix6dBase M2)
Adds matrix M1 to M2 and places the result in this matrix.
|
void |
addObj(Matrix6d M1)
Adds
v1 to this vector. |
void |
addSubMatrix00(Matrix3dBase M)
Adds to 3x3 sub-matrix of this matrix starting at (0, 0).
|
void |
addSubMatrix03(Matrix3dBase M)
Adds to the 3x3 sub-matrix of this matrix starting at (0, 3).
|
void |
addSubMatrix30(Matrix3dBase M)
Adds to the 3x3 sub-matrix of this matrix starting at (3, 0).
|
void |
addSubMatrix33(Matrix3dBase M)
Adds to the 3x3 sub-matrix of this matrix starting at (3, 3).
|
Matrix6d |
clone() |
void |
crossProductTransform(Vector3d p,
Matrix6d M1)
Applies an cross product transformation to a matrix M1 and places
the result in this matrix.
|
boolean |
epsilonEquals(Matrix6d M1,
double tol)
Returns true if the components of this vector are equal to those of
v1, within the tolerance tol. |
void |
getSubMatrix00(Matrix3dBase M)
Gets the 3x3 sub-matrix of this matrix starting at (0, 0).
|
void |
getSubMatrix03(Matrix3dBase M)
Gets the 3x3 sub-matrix of this matrix starting at (0, 3).
|
void |
getSubMatrix30(Matrix3dBase M)
Gets the 3x3 sub-matrix of this matrix starting at (3, 0).
|
void |
getSubMatrix33(Matrix3dBase M)
Gets the 3x3 sub-matrix of this matrix starting at (3, 3).
|
void |
inverseTransform(RotationMatrix3d R)
Applies an inverse rotational transformation R to this matrix, in place.
|
void |
inverseTransform(RotationMatrix3d R,
Matrix6d M1)
Applies an inverse rotational transformation R to a matrix M1 and place
the result in this matrix.
|
boolean |
invert(Matrix6dBase M)
Inverts the matrix M and places the result in this matrix, return false if
M is detected to be singular.
|
void |
mul(Matrix6dBase M1)
Multiplies this matrix by M1 and places the result in this matrix.
|
void |
mul(Matrix6dBase M1,
Matrix6dBase M2)
Multiplies matrix M1 by M2 and places the result in this matrix.
|
void |
mulAdd(Matrix M1,
Matrix M2)
Multiplies M1 by M2 and places the result in this matrix.
|
boolean |
mulInverse(Matrix6dBase M1)
Multiplies this matrix by the inverse of M1 and places the result in this
matrix.
|
boolean |
mulInverseBoth(Matrix6dBase M1,
Matrix6dBase M2)
Multiplies the inverse of matrix M1 by the inverse of M2 and places the
result in this matrix.
|
boolean |
mulInverseLeft(Matrix6dBase M1,
Matrix6dBase M2)
Multiplies the inverse of matrix M1 by M2 and places the result in this
matrix.
|
boolean |
mulInverseRight(Matrix6dBase M1,
Matrix6dBase M2)
Multiplies matrix M1 by the inverse of M2 and places the result in this
matrix.
|
void |
mulTranspose(Matrix6dBase M1)
Multiplies this matrix by the transpose of M1 and places the result in
this matrix.
|
void |
mulTransposeBoth(Matrix6dBase M1,
Matrix6dBase M2)
Multiplies the transpose of matrix M1 by the transpose of M2 and places
the result in this matrix.
|
void |
mulTransposeLeft(Matrix6dBase M1,
Matrix6dBase M2)
Multiplies the transpose of matrix M1 by M2 and places the result in this
matrix.
|
void |
mulTransposeLeftAdd(Matrix M1,
Matrix M2)
Multiplies M1^T by M2 and places the result in this matrix.
|
void |
mulTransposeRight(Matrix6dBase M1,
Matrix6dBase M2)
Multiplies matrix M1 by the transpose of M2 and places the result in this
matrix.
|
void |
mulTransposeRightAdd(Matrix M1,
Matrix M2)
Multiplies M1 by M2^T and places the result in this matrix.
|
void |
negate(Matrix6dBase M1)
Sets this matrix to the negative of M1.
|
void |
scale(double s)
Scales the elements of this matrix by
s. |
void |
scale(double s,
Matrix6dBase M1)
Scales the elements of matrix M1 by
s and places the
results in this matrix. |
void |
scaledAddObj(double s,
Matrix6d M1)
Scales
v1 by s and adds it to this vector. |
void |
scaleObj(double s)
Scales this vector by
s. |
void |
set(Matrix6d M1)
Sets this vector to
v1 |
void |
setDiagonal(double[] vals)
Sets this matrix to a diagonal matrix whose values are specified by the
array vals.
|
void |
setDiagonal(double m00,
double m11,
double m22,
double m33,
double m44,
double m55)
Sets this matrix to a diagonal matrix whose values are specified.
|
void |
setDiagonal(VectorNd diag) |
void |
setLowerToUpper()
Makes this matrix symmetric by setting its lower triangular elements
equal to the corresponding upper triangular elements.
|
void |
setRandom()
Sets the elements of this matrix to uniformly distributed random values in
the range -0.5 (inclusive) to 0.5 (exclusive).
|
void |
setRandom(double lower,
double upper)
Sets the elements of this matrix to uniformly distributed random values in
a specified range.
|
void |
setRandom(double lower,
double upper,
java.util.Random generator)
Sets the elements of this matrix to uniformly distributed random values in
a specified range, using a supplied random number generator.
|
void |
setSubMatrix00(Matrix3dBase M)
Sets the 3x3 sub-matrix of this matrix starting at (0, 0).
|
void |
setSubMatrix03(Matrix3dBase M)
Sets the 3x3 sub-matrix of this matrix starting at (0, 3).
|
void |
setSubMatrix30(Matrix3dBase M)
Sets the 3x3 sub-matrix of this matrix starting at (3, 0).
|
void |
setSubMatrix33(Matrix3dBase M)
Sets the 3x3 sub-matrix of this matrix starting at (3, 3).
|
void |
setZero()
Sets the elements of this matrix to zero.
|
void |
sub(Matrix6dBase M1)
Subtracts this matrix from M1 and places the result in this matrix.
|
void |
sub(Matrix6dBase M1,
Matrix6dBase M2)
Subtracts matrix M1 from M2 and places the result in this matrix.
|
void |
transform(RotationMatrix3d R)
Applies a rotational transformation R to this matrix, in place.
|
void |
transform(RotationMatrix3d R,
Matrix6d M1)
Applies a rotational transformation R to M1 and place the result in this
matrix.
|
void |
transpose(Matrix6dBase M1)
Sets this matrix to the transpose of M
|
colSize, determinant, epsilonEquals, equals, frobeniusNorm, get, get, get, getColumn, getColumn, getRow, getRow, infinityNorm, invert, mul, mul, mulInverse, mulInverse, mulInverseTranspose, mulInverseTranspose, mulTranspose, mulTranspose, negate, oneNorm, rowSize, scaledAdd, set, set, set, set, setColumn, setIdentity, setRow, transposeadd, checkConsistency, set, set, set, setCCSValues, setColumn, setCRSValues, setRow, setSubMatrixcontainsNaN, epsilonEquals, equals, frobeniusNormSquared, get, getCCSIndices, getCCSIndices, getCCSIndices, getCCSValues, getCCSValues, getCCSValues, getColumn, getCRSIndices, getCRSIndices, getCRSIndices, getCRSValues, getCRSValues, getCRSValues, getDefaultFormat, getRow, getSize, getSubMatrix, hasNaN, idString, isFixedSize, isSymmetric, isWritable, maxNorm, mul, mul, mulAdd, mulAdd, mulAdd, mulTranspose, mulTranspose, mulTransposeAdd, mulTransposeAdd, mulTransposeAdd, numNonZeroVals, numNonZeroVals, scan, scan, setCRSValues, setDefaultFormat, setSize, toString, toString, toString, trace, write, write, write, write, write, write, write, writeToFileequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetThreeVectorValueisWritable, scan, writeepsilonEquals, equals, frobeniusNormSquared, getCCSIndices, getCCSIndices, getCCSIndices, getCCSValues, getCCSValues, getCCSValues, getColumn, getCRSIndices, getCRSIndices, getCRSIndices, getCRSValues, getCRSValues, getCRSValues, getRow, getSize, getSubMatrix, isFixedSize, isSymmetric, maxNorm, mul, mul, mulAdd, mulAdd, mulAdd, mulTranspose, mulTranspose, mulTransposeAdd, mulTransposeAdd, mulTransposeAdd, numNonZeroVals, numNonZeroVals, scan, setSize, toString, toString, trace, write, write, writepublic static final Matrix6d ZERO
public Matrix6d()
public Matrix6d(double[] vals)
vals - element values for the matrix, with element (i,j) stored at location
i*6+jpublic Matrix6d(Matrix M)
M - matrix object to be copied.public void getSubMatrix00(Matrix3dBase M)
M - returns the sub matrixpublic void getSubMatrix30(Matrix3dBase M)
M - returns the sub matrixpublic void getSubMatrix03(Matrix3dBase M)
M - returns the sub matrixpublic void getSubMatrix33(Matrix3dBase M)
M - returns the sub matrixpublic void setSubMatrix00(Matrix3dBase M)
M - new sub matrix valuepublic void setSubMatrix30(Matrix3dBase M)
M - new sub matrix valuepublic void setSubMatrix03(Matrix3dBase M)
M - new sub matrix valuepublic void setSubMatrix33(Matrix3dBase M)
M - new sub matrix valuepublic void addSubMatrix00(Matrix3dBase M)
M - sub matrix to addpublic void addSubMatrix30(Matrix3dBase M)
M - sub matrix to addpublic void addSubMatrix03(Matrix3dBase M)
M - sub matrix to addpublic void addSubMatrix33(Matrix3dBase M)
M - sub matrix to addpublic void mul(Matrix6dBase M1)
M1 - right-hand matrixpublic void mul(Matrix6dBase M1, Matrix6dBase M2)
M1 - left-hand matrixM2 - right-hand matrixpublic void mulTranspose(Matrix6dBase M1)
M1 - right-hand matrixpublic void mulTransposeLeft(Matrix6dBase M1, Matrix6dBase M2)
M1 - left-hand matrixM2 - right-hand matrixpublic void mulTransposeRight(Matrix6dBase M1, Matrix6dBase M2)
M1 - left-hand matrixM2 - right-hand matrixpublic void mulTransposeBoth(Matrix6dBase M1, Matrix6dBase M2)
M1 - left-hand matrixM2 - right-hand matrixpublic boolean mulInverse(Matrix6dBase M1)
M1 - right-hand matrixpublic boolean mulInverseRight(Matrix6dBase M1, Matrix6dBase M2)
M1 - left-hand matrixM2 - right-hand matrixpublic boolean mulInverseLeft(Matrix6dBase M1, Matrix6dBase M2)
M1 - left-hand matrixM2 - right-hand matrixpublic boolean mulInverseBoth(Matrix6dBase M1, Matrix6dBase M2)
M1 - left-hand matrixM2 - right-hand matrixpublic void mulAdd(Matrix M1, Matrix M2)
M1 - left matrix termM2 - right matrix termpublic void mulTransposeRightAdd(Matrix M1, Matrix M2)
M1 - left matrix termM2 - right matrix termpublic void mulTransposeLeftAdd(Matrix M1, Matrix M2)
M1 - left matrix termM2 - right matrix termpublic void add(Matrix6dBase M1, Matrix6dBase M2)
M1 - left-hand matrixM2 - right-hand matrixpublic void add(Matrix6dBase M1)
M1 - right-hand matrixpublic void sub(Matrix6dBase M1, Matrix6dBase M2)
M1 - left-hand matrixM2 - right-hand matrixpublic void sub(Matrix6dBase M1)
M1 - right-hand matrixpublic void scale(double s)
s.s - scaling factorpublic void scale(double s,
Matrix6dBase M1)
s and places the
results in this matrix.s - scaling factorM1 - matrix to be scaledpublic void negate(Matrix6dBase M1)
M1 - matrix to negatepublic void transpose(Matrix6dBase M1)
M1 - matrix to take the transpose ofpublic void setZero()
setZero in interface VectorObject<Matrix6d>public void setRandom()
setRandom in class DenseMatrixBasepublic void setRandom(double lower,
double upper)
lower - lower random value (inclusive)upper - upper random value (exclusive)public void setRandom(double lower,
double upper,
java.util.Random generator)
lower - lower random value (inclusive)upper - upper random value (exclusive)generator - random number generatorpublic boolean invert(Matrix6dBase M)
M - matrix to invertpublic void setDiagonal(VectorNd diag)
public void setDiagonal(double[] vals)
vals - diagonal valuespublic void setDiagonal(double m00,
double m11,
double m22,
double m33,
double m44,
double m55)
m00 - first diagonal valuem11 - second diagonal valuem22 - third diagonal valuem33 - fourth diagonal valuem44 - fifth diagonal valuem55 - sixth diagonal valuepublic void transform(RotationMatrix3d R)
transform(R,M)
with M equal to this matrix.R - rotational transformation matrixpublic void transform(RotationMatrix3d R, Matrix6d M1)
[ R 0 ] [ R^T 0 ]
[ ] M1 [ ]
[ 0 R ] [ 0 R^T ]
R - rotational transformation matrixM1 - matrix to transformpublic void inverseTransform(RotationMatrix3d R)
inverseTransform(R,M)
with M equal to this matrix.R - rotational transformation matrixpublic void inverseTransform(RotationMatrix3d R, Matrix6d M1)
[ R^T 0 ] [ R 0 ]
[ ] M1 [ ]
[ 0 R^T ] [ 0 R ]
R - rotational transformation matrixM1 - matrix to transformpublic void crossProductTransform(Vector3d p, Matrix6d M1)
[ I 0 ] [ I -[p] ]
[ ] M1 [ ]
[ [p] I ] [ 0 I ]
where [p] is the 3 x 3 skew-symmetric matrix that
implements the cross product for a vector p.p - vector defining the cross productM1 - matrix to transformpublic void setLowerToUpper()
public Matrix6d clone()
clone in interface Clonableclone in class Matrix6dBasepublic void scaleObj(double s)
s.scaleObj in interface VectorObject<Matrix6d>public void addObj(Matrix6d M1)
v1 to this vector.addObj in interface VectorObject<Matrix6d>public void scaledAddObj(double s,
Matrix6d M1)
v1 by s and adds it to this vector.scaledAddObj in interface VectorObject<Matrix6d>public void set(Matrix6d M1)
v1set in interface VectorObject<Matrix6d>public boolean epsilonEquals(Matrix6d M1, double tol)
v1, within the tolerance tol. If tol = 0, then
exact equality is required.epsilonEquals in interface VectorObject<Matrix6d>