maspack.matrix
Class Matrix3d

java.lang.Object
  extended by maspack.matrix.MatrixBase
      extended by maspack.matrix.DenseMatrixBase
          extended by maspack.matrix.Matrix3dBase
              extended by maspack.matrix.Matrix3d
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, DenseMatrix, LinearTransformNd, Matrix, Clonable
Direct Known Subclasses:
Matrix3x3Block

public class Matrix3d
extends Matrix3dBase

A general 3 x 3 matrix with the elements stored as explicit fields.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface maspack.matrix.Matrix
Matrix.Partition, Matrix.WriteFormat
 
Field Summary
static Matrix3d IDENTITY
          Global identity matrix.
static Matrix3d ZERO
          Global zero matrix.
 
Fields inherited from class maspack.matrix.Matrix3dBase
m00, m01, m02, m10, m11, m12, m20, m21, m22
 
Fields inherited from interface maspack.matrix.Matrix
INDEFINITE, POSITIVE_DEFINITE, SPD, SYMMETRIC
 
Constructor Summary
Matrix3d()
          Creates a matrix and initializes it to zero.
Matrix3d(double[] vals)
          Creates a matrix and initializes its elements from an array of values.
Matrix3d(double m00, double m01, double m02, double m10, double m11, double m12, double m20, double m21, double m22)
          Creates a matrix and initializes its elements from the specified values.
Matrix3d(Matrix3dBase M)
          Creates a matrix and initializes its elements to those of the matrix M.
 
Method Summary
 void add(Matrix3dBase M1)
          Adds this matrix to M1 and places the result in this matrix.
 void add(Matrix3dBase M1, Matrix3dBase M2)
          Adds matrix M1 to M2 and places the result in this matrix.
 void addOuterProduct(double x0, double y0, double z0, double x1, double y1, double z1)
          Adds an outer product to this matrix.
 void addOuterProduct(Vector3d v0, Vector3d v1)
          Adds an outer product to this matrix.
 void addScaledOuterProduct(double s, Vector3d v0, Vector3d v1)
          Adds a scaled outer product to this matrix.
 void crossProduct(Matrix3dBase M, Vector3d v)
          Computes the cross product of each row of M with v and places the result in this matrix.
 void crossProduct(Vector3d v, Matrix3dBase M)
          Computes the cross product of v with each column of M and places the result in this matrix.
 void factorQR(Matrix3d Q, Matrix3d R)
          Computes the QR decompostion for this matrix, for which
 double fastInvert(Matrix3dBase M)
          Quickly inverts the matrix M using the determinant formula and returns the computed determinant.
 void inverseTransform(RotationMatrix3d R)
          Applies an inverse rotational transformation R to this matrix, in place.
 void inverseTransform(RotationMatrix3d R, Matrix3d M)
          Applies an inverse rotational transformation R to a matrix M, and place the result in this matrix.
 boolean invert()
          Inverts this matrix in place, returning false if the matrix is detected to be singular.
 boolean invert(Matrix3dBase M)
          Inverts the matrix M and places the result in this matrix, return false if M is detected to be singular.
static void main(java.lang.String[] args)
           
 void mul(Matrix3dBase M1)
          Multiplies this matrix by M1 and places the result in this matrix.
 void mul(Matrix3dBase M1, Matrix3dBase M2)
          Multiplies matrix M1 by M2 and places the result in this matrix.
 void mulDiagonalLeft(double d00, double d11, double d22)
          Pre-multiplies, in place, this matrix by a diagonal matrix whose (diagonal) elements are explicitly specified.
 void mulDiagonalLeft(Vector3d diag)
          Pre-multiplies, in place, this matrix by a diagonal matrix whose (diagonal) elements are specified by a vector.
 void mulDiagonalRight(double d00, double d11, double d22)
          Post-multiplies, in place, this matrix by a diagonal matrix whose (diagonal) elements are explicitly specified.
 void mulDiagonalRight(Vector3d diag)
          Post-multiplies, in place, this matrix by a diagonal matrix whose (diagonal) elements are specified by a vector.
 boolean mulInverse(Matrix3dBase M1)
          Multiplies this matrix by the inverse of M1 and places the result in this matrix.
 boolean mulInverseBoth(Matrix3dBase M1, Matrix3dBase M2)
          Multiplies the inverse of matrix M1 by the inverse of M2 and places the result in this matrix.
 boolean mulInverseLeft(Matrix3dBase M1, Matrix3dBase M2)
          Multiplies the inverse of matrix M1 by M2 and places the result in this matrix.
 boolean mulInverseRight(Matrix3dBase M1, Matrix3dBase M2)
          Multiplies matrix M1 by the inverse of M2 and places the result in this matrix.
 void mulTranspose(Matrix3dBase M1)
          Multiplies this matrix by the transpose of M1 and places the result in this matrix.
 void mulTransposeBoth(Matrix3dBase M1, Matrix3dBase M2)
          Multiplies the transpose of matrix M1 by the transpose of M2 and places the result in this matrix.
 void mulTransposeLeft(Matrix3dBase M1, Matrix3dBase M2)
          Multiplies the transpose of matrix M1 by M2 and places the result in this matrix.
 void mulTransposeRight(Matrix3dBase M1, Matrix3dBase M2)
          Multiplies matrix M1 by the transpose of M2 and places the result in this matrix.
 void negate(Matrix3dBase M1)
          Sets this matrix to the negative of M1.
 void outerProduct(Vector3d v1, Vector3d v2)
          Sets this matrix to the outer product of the two vectors v1 and v2.
 void permuteColumns(int[] permutation)
          Rearrange the columns of this matrix according to the specified permutation, such that each column j is replaced by column permutation[j].
 void permuteColumns(int col0, int col1, int col2)
          Rearrange the columns of this matrix according to the specified permutation.
 void permuteRows(int[] permutation)
          Rearrange the rows of this matrix according to the specified permutation, such that each row i is replaced by row permutation[i].
 void permuteRows(int row0, int row1, int row2)
          Rearrange the rows of this matrix according to the specified permutation.
 void scale(double s)
          Scales the elements of this matrix by s.
 void scale(double s, Matrix3dBase M1)
          Scales the elements of matrix M1 by s and places the results in this matrix.
 void scaledAdd(double s, Matrix3d M1)
          Scales this matrix by s, adds M1, and places the result in this matrix.
 void scaledAdd(double s, Matrix3dBase M1)
          Computes s M1 and adds the result to this matrix.
 void scaledAdd(double s, Matrix3dBase M1, Matrix3dBase M2)
          Computes s M1 + M2 and places the result in this matrix.
 void set(double m00, double m01, double m02, double m10, double m11, double m12, double m20, double m21, double m22)
          Sets the values of this matrix.
 void setColumns(Vector3d v0, Vector3d v1, Vector3d v2)
          Sets the columns of this matrix to the vectors v0, v1, and v2.
 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)
          Sets this matrix to a diagonal matrix whose values are specified.
 void setDiagonal(Vector3d diag)
          Sets this matrix to a diagonal matrix whose values are specified by diag.
 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 setRows(Vector3d v0, Vector3d v1, Vector3d v2)
          Sets the rows of this matrix to the vectors v0, v1, and v2.
 void setSkewSymmetric(Vector3d v)
          Sets this matrix to the skew-symmetric matrix of vector v
 void setSymmetric(Matrix3d M1)
          Sets this matrix to the symmetric component of matrix M1
 void setZero()
          Sets the elements of this matrix to zero.
 void sub(Matrix3dBase M1)
          Subtracts this matrix from M1 and places the result in this matrix.
 void sub(Matrix3dBase M1, Matrix3dBase 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, Matrix3d M)
          Applies a rotational transformation R to a matrix M, and place the result in this matrix.
 void transpose(Matrix3dBase M1)
          Takes the transpose of matrix M1 and places the result in this matrix.
 
Methods inherited from class maspack.matrix.Matrix3dBase
clone, colSize, determinant, epsilonEquals, equals, factorQR, frobeniusNorm, get, get, getColumn, getColumn, getColumn, getRow, getRow, getRow, infinityNorm, isIdentity, mul, mul, mul, mulAdd, mulInverse, mulInverse, mulInverseTranspose, mulInverseTranspose, mulTranspose, mulTranspose, mulTransposeAdd, negate, oneNorm, orthogonalDeterminant, rowSize, set, set, set, set, setColumn, setColumn, setIdentity, setRow, setRow, trace, transpose
 
Methods inherited from class maspack.matrix.DenseMatrixBase
add, checkConsistency, set, set, set, setCCSValues, setColumn, setCRSValues, setRow, setSubMatrix
 
Methods inherited from class maspack.matrix.MatrixBase
containsNaN, epsilonEquals, equals, get, getCCSIndices, getCCSIndices, getCCSValues, getCCSValues, getColumn, getCRSIndices, getCRSIndices, getCRSValues, getCRSValues, getDefaultFormat, getRow, getSize, getSubMatrix, hasNaN, idString, isFixedSize, isSymmetric, mul, mul, mulAdd, mulAdd, mulAdd, mulTranspose, mulTranspose, mulTranspose, mulTransposeAdd, mulTransposeAdd, mulTransposeAdd, numNonZeroVals, numNonZeroVals, scan, setCRSValues, setDefaultFormat, setSize, toString, toString, toString, 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
epsilonEquals, equals, getCCSIndices, getCCSIndices, getCCSValues, getCCSValues, getColumn, getCRSIndices, getCRSIndices, getCRSValues, getCRSValues, getRow, getSize, getSubMatrix, isFixedSize, isSymmetric, mul, mul, mulAdd, mulAdd, mulAdd, mulTranspose, mulTranspose, mulTranspose, mulTransposeAdd, mulTransposeAdd, mulTransposeAdd, numNonZeroVals, numNonZeroVals, scan, setSize, toString, write, write, write
 

Field Detail

IDENTITY

public static final Matrix3d IDENTITY
Global identity matrix. Should not be modified.


ZERO

public static final Matrix3d ZERO
Global zero matrix. Should not be modified.

Constructor Detail

Matrix3d

public Matrix3d()
Creates a matrix and initializes it to zero.


Matrix3d

public Matrix3d(double[] vals)
Creates a matrix and initializes its elements from an array of values.

Parameters:
vals - element values for the matrix, with element (i,j) stored at location i*3+j

Matrix3d

public Matrix3d(double m00,
                double m01,
                double m02,
                double m10,
                double m11,
                double m12,
                double m20,
                double m21,
                double m22)
Creates a matrix and initializes its elements from the specified values.

Parameters:
m00 - element (0,0)
m01 - element (0,1)
m02 - element (0,2)
m10 - element (1,0)
m11 - element (1,1)
m12 - element (1,2)
m20 - element (2,0)
m21 - element (2,1)
m22 - element (2,2)

Matrix3d

public Matrix3d(Matrix3dBase M)
Creates a matrix and initializes its elements to those of the matrix M.

Parameters:
M - matrix object to be copied.
Method Detail

setColumns

public void setColumns(Vector3d v0,
                       Vector3d v1,
                       Vector3d v2)
Sets the columns of this matrix to the vectors v0, v1, and v2.

Parameters:
v0 - values for the first column
v1 - values for the second column
v2 - values for the third column

set

public void set(double m00,
                double m01,
                double m02,
                double m10,
                double m11,
                double m12,
                double m20,
                double m21,
                double m22)
Sets the values of this matrix.

Parameters:
m00 - element (0,0)
m01 - element (0,1)
m02 - element (0,2)
m10 - element (1,0)
m11 - element (1,1)
m12 - element (1,2)
m20 - element (2,0)
m21 - element (2,1)
m22 - element (2,2)

setRows

public void setRows(Vector3d v0,
                    Vector3d v1,
                    Vector3d v2)
Sets the rows of this matrix to the vectors v0, v1, and v2.

Parameters:
v0 - values for the first row
v1 - values for the second row
v2 - values for the third row

mul

public void mul(Matrix3dBase M1)
Multiplies this matrix by M1 and places the result in this matrix.

Parameters:
M1 - right-hand matrix

mul

public void mul(Matrix3dBase M1,
                Matrix3dBase M2)
Multiplies matrix M1 by M2 and places the result in this matrix.

Parameters:
M1 - left-hand matrix
M2 - right-hand matrix

mulTranspose

public void mulTranspose(Matrix3dBase M1)
Multiplies this matrix by the transpose of M1 and places the result in this matrix.

Parameters:
M1 - right-hand matrix

mulTransposeLeft

public void mulTransposeLeft(Matrix3dBase M1,
                             Matrix3dBase M2)
Multiplies the transpose of matrix M1 by M2 and places the result in this matrix.

Parameters:
M1 - left-hand matrix
M2 - right-hand matrix

mulTransposeRight

public void mulTransposeRight(Matrix3dBase M1,
                              Matrix3dBase M2)
Multiplies matrix M1 by the transpose of M2 and places the result in this matrix.

Parameters:
M1 - left-hand matrix
M2 - right-hand matrix

mulTransposeBoth

public void mulTransposeBoth(Matrix3dBase M1,
                             Matrix3dBase M2)
Multiplies the transpose of matrix M1 by the transpose of M2 and places the result in this matrix.

Parameters:
M1 - left-hand matrix
M2 - right-hand matrix

mulInverse

public boolean mulInverse(Matrix3dBase M1)
Multiplies this matrix by the inverse of M1 and places the result in this matrix.

Parameters:
M1 - right-hand matrix
Returns:
false if M1 is singular

mulInverseRight

public boolean mulInverseRight(Matrix3dBase M1,
                               Matrix3dBase M2)
Multiplies matrix M1 by the inverse of M2 and places the result in this matrix.

Parameters:
M1 - left-hand matrix
M2 - right-hand matrix
Returns:
false if M2 is singular

mulInverseLeft

public boolean mulInverseLeft(Matrix3dBase M1,
                              Matrix3dBase M2)
Multiplies the inverse of matrix M1 by M2 and places the result in this matrix.

Parameters:
M1 - left-hand matrix
M2 - right-hand matrix
Returns:
false if M1 is singular

mulInverseBoth

public boolean mulInverseBoth(Matrix3dBase M1,
                              Matrix3dBase M2)
Multiplies the inverse of matrix M1 by the inverse of M2 and places the result in this matrix.

Parameters:
M1 - left-hand matrix
M2 - right-hand matrix
Returns:
false if M1 or M2 is singular

mulDiagonalLeft

public void mulDiagonalLeft(Vector3d diag)
Pre-multiplies, in place, this matrix by a diagonal matrix whose (diagonal) elements are specified by a vector. This is the same as multiplying the rows of this matrix by the elements of the vector.

Parameters:
diag - specifies the diagonal elements of the implied left-hand matrix

mulDiagonalLeft

public void mulDiagonalLeft(double d00,
                            double d11,
                            double d22)
Pre-multiplies, in place, this matrix by a diagonal matrix whose (diagonal) elements are explicitly specified. This is the same as multiplying the rows of this matrix by the diagnonal elements.

Parameters:
d00 - first diagnonal element of the implied left-hand matrix
d11 - second diagonal element of the implied left-hand matrix
d22 - third diagnonal element of the implied left-hand matrix

mulDiagonalRight

public void mulDiagonalRight(Vector3d diag)
Post-multiplies, in place, this matrix by a diagonal matrix whose (diagonal) elements are specified by a vector. This is the same as multiplying the columns of this matrix by the elements of the vector.

Parameters:
diag - specifies the diagonal elements of the implied right-hand matrix

mulDiagonalRight

public void mulDiagonalRight(double d00,
                             double d11,
                             double d22)
Post-multiplies, in place, this matrix by a diagonal matrix whose (diagonal) elements are explicitly specified. This is the same as multiplying the columns of this matrix by diagonal elements.

Parameters:
d00 - first diagnonal element of the implied right-hand matrix
d11 - second diagonal element of the implied right-hand matrix
d22 - third diagnonal element of the implied right-hand matrix

add

public void add(Matrix3dBase M1,
                Matrix3dBase M2)
Adds matrix M1 to M2 and places the result in this matrix.

Parameters:
M1 - left-hand matrix
M2 - right-hand matrix

add

public void add(Matrix3dBase M1)
Adds this matrix to M1 and places the result in this matrix.

Parameters:
M1 - right-hand matrix

sub

public void sub(Matrix3dBase M1,
                Matrix3dBase M2)
Subtracts matrix M1 from M2 and places the result in this matrix.

Parameters:
M1 - left-hand matrix
M2 - right-hand matrix

sub

public void sub(Matrix3dBase M1)
Subtracts this matrix from M1 and places the result in this matrix.

Parameters:
M1 - right-hand matrix

scale

public void scale(double s)
Scales the elements of this matrix by s.

Parameters:
s - scaling factor

scale

public void scale(double s,
                  Matrix3dBase M1)
Scales the elements of matrix M1 by s and places the results in this matrix.

Parameters:
s - scaling factor
M1 - matrix to be scaled

scaledAdd

public void scaledAdd(double s,
                      Matrix3dBase M1,
                      Matrix3dBase M2)
Computes s M1 + M2 and places the result in this matrix.

Parameters:
s - scaling factor
M1 - matrix to be scaled
M2 - matrix to be added

scaledAdd

public void scaledAdd(double s,
                      Matrix3dBase M1)
Computes s M1 and adds the result to this matrix.

Parameters:
s - scaling factor
M1 - matrix to be scaled and added

scaledAdd

public void scaledAdd(double s,
                      Matrix3d M1)
Scales this matrix by s, adds M1, and places the result in this matrix.

Parameters:
s - scaling factor
M1 - matrix to be added

negate

public void negate(Matrix3dBase M1)
Sets this matrix to the negative of M1.

Parameters:
M1 - matrix to negate

transpose

public void transpose(Matrix3dBase M1)
Takes the transpose of matrix M1 and places the result in this matrix.

Parameters:
M1 - matrix to take the transpose of

setZero

public void setZero()
Sets the elements of this matrix to zero.


setRandom

public void setRandom()
Sets the elements of this matrix to uniformly distributed random values in the range -0.5 (inclusive) to 0.5 (exclusive).


setRandom

public void setRandom(double lower,
                      double upper)
Sets the elements of this matrix to uniformly distributed random values in a specified range.

Parameters:
lower - lower random value (inclusive)
upper - upper random value (exclusive)

setRandom

public 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.

Parameters:
lower - lower random value (inclusive)
upper - upper random value (exclusive)
generator - random number generator

invert

public boolean invert()
Inverts this matrix in place, returning false if the matrix is detected to be singular. The inverse is computed using an unrolled LU decomposition with partial pivoting.

Overrides:
invert in class Matrix3dBase

fastInvert

public double fastInvert(Matrix3dBase M)
Quickly inverts the matrix M using the determinant formula and returns the computed determinant. If the determinant is 0, no inversion is performed.

Parameters:
M - matrix to invert
Returns:
determinant of M

invert

public boolean invert(Matrix3dBase M)
Inverts the matrix M and places the result in this matrix, return false if M is detected to be singular. The inverse is computed using an unrolled LU decomposition with partial pivoting.

Parameters:
M - matrix to invert
Returns:
false if M is singular

setDiagonal

public void setDiagonal(Vector3d diag)
Sets this matrix to a diagonal matrix whose values are specified by diag.

Parameters:
diag - diagonal values

setDiagonal

public void setDiagonal(double[] vals)
Sets this matrix to a diagonal matrix whose values are specified by the array vals.

Parameters:
vals - diagonal values

setDiagonal

public void setDiagonal(double m00,
                        double m11,
                        double m22)
Sets this matrix to a diagonal matrix whose values are specified.

Parameters:
m00 - first diagonal value
m11 - second diagonal value
m22 - third diagonal value

setSymmetric

public void setSymmetric(Matrix3d M1)
Sets this matrix to the symmetric component of matrix M1


setSkewSymmetric

public void setSkewSymmetric(Vector3d v)
Sets this matrix to the skew-symmetric matrix of vector v


outerProduct

public void outerProduct(Vector3d v1,
                         Vector3d v2)
Sets this matrix to the outer product of the two vectors v1 and v2.

Parameters:
v1 - first vector
v2 - second vector

addOuterProduct

public void addOuterProduct(double x0,
                            double y0,
                            double z0,
                            double x1,
                            double y1,
                            double z1)
Adds an outer product to this matrix. The outer product is formed from two vectors whose coordinates are given as arguments.

Parameters:
x0 - first vector x coordinate
y0 - first vector y coordinate
z0 - first vector z coordinate
x1 - second vector x coordinate
y1 - second vector y coordinate
z1 - second vector z coordinate

addOuterProduct

public void addOuterProduct(Vector3d v0,
                            Vector3d v1)
Adds an outer product to this matrix. The outer product is formed from two vectors are given as arguments.

Parameters:
v0 - first vector
v1 - second vector

addScaledOuterProduct

public void addScaledOuterProduct(double s,
                                  Vector3d v0,
                                  Vector3d v1)
Adds a scaled outer product to this matrix. The outer product is formed from two vectors are given as arguments.

Parameters:
s - scaling factor
v0 - first vector
v1 - second vector

crossProduct

public void crossProduct(Vector3d v,
                         Matrix3dBase M)
Computes the cross product of v with each column of M and places the result in this matrix.

Parameters:
v - first cross product argument
M - matrix whose columns supply the second cross product argument

crossProduct

public void crossProduct(Matrix3dBase M,
                         Vector3d v)
Computes the cross product of each row of M with v and places the result in this matrix.

Parameters:
M - matrix whose rows supply the first cross product argument
v - second cross product argument

permuteColumns

public void permuteColumns(int col0,
                           int col1,
                           int col2)
Rearrange the columns of this matrix according to the specified permutation. In particular, column 0 is set to the original value of column col0, column 1 is set to the original value of column col1, etc. If any index value is out of range, the associated column is left unchanged.

Parameters:
col0 - index of the original column which is to replace column 0
col1 - index of the original column which is to replace column 1
col2 - index of the original column which is to replace column 2

permuteColumns

public void permuteColumns(int[] permutation)
Rearrange the columns of this matrix according to the specified permutation, such that each column j is replaced by column permutation[j]. If any index value is out of range, the associated column is left unchanged.

Parameters:
permutation - describes the column exchanges
Throws:
ImproperSizeException - if the length of permutation is less than 3

permuteRows

public void permuteRows(int row0,
                        int row1,
                        int row2)
Rearrange the rows of this matrix according to the specified permutation. In particular, row 0 is set to the original value of row row0, row 1 is set to the original value of row row1, etc. If any index value is out of range, the associated row is left unchanged.

Parameters:
row0 - index of the original row which is to replace row 0
row1 - index of the original row which is to replace row 1
row2 - index of the original row which is to replace row 2

permuteRows

public void permuteRows(int[] permutation)
Rearrange the rows of this matrix according to the specified permutation, such that each row i is replaced by row permutation[i]. If any index value is out of range, the associated row is left unchanged.

Parameters:
permutation - describes the row exchanges
Throws:
ImproperSizeException - if the length of permutation is less than 3.

transform

public void transform(RotationMatrix3d R)
Applies a rotational transformation R to this matrix, in place. This is equivalent to forming the product
    R M R^T
 
where M is this matrix.

Parameters:
R - rotational transformation matrix

transform

public void transform(RotationMatrix3d R,
                      Matrix3d M)
Applies a rotational transformation R to a matrix M, and place the result in this matrix. This is equivalent to forming the product
    R M R^T
 

Parameters:
R - rotational transformation matrix
M - matrix to transform

inverseTransform

public void inverseTransform(RotationMatrix3d R)
Applies an inverse rotational transformation R to this matrix, in place. This is equivalent to forming the product
    R^T M R
 
where M is this matrix.

Parameters:
R - rotational transformation matrix

inverseTransform

public void inverseTransform(RotationMatrix3d R,
                             Matrix3d M)
Applies an inverse rotational transformation R to a matrix M, and place the result in this matrix. This is equivalent to forming the product
    R^T M R
 

Overrides:
inverseTransform in class Matrix3dBase
Parameters:
R - rotational transformation matrix
M - matrix to transform

main

public static void main(java.lang.String[] args)

factorQR

public void factorQR(Matrix3d Q,
                     Matrix3d R)
Computes the QR decompostion for this matrix, for which
    M = Q R
 
where Q is orthogonal and R is upper triangular.

Parameters:
Q - if non-null, returns Q
R - if non-null, returns R The computation is the same as that performed by the QRDecomposition class, except significantly faster.