public abstract class Matrix6dBase extends DenseMatrixBase implements Clonable
Matrix.Partition, Matrix.WriteFormat
Modifier and Type | Field and Description |
---|---|
double |
m00
Matrix element (0,0)
|
double |
m01
Matrix element (0,1)
|
double |
m02
Matrix element (0,2)
|
double |
m03
Matrix element (0,3)
|
double |
m04
Matrix element (0,4)
|
double |
m05
Matrix element (0,5)
|
double |
m10
Matrix element (1,0)
|
double |
m11
Matrix element (1,1)
|
double |
m12
Matrix element (1,2)
|
double |
m13
Matrix element (1,3)
|
double |
m14
Matrix element (1,4)
|
double |
m15
Matrix element (1,5)
|
double |
m20
Matrix element (2,0)
|
double |
m21
Matrix element (2,1)
|
double |
m22
Matrix element (2,2)
|
double |
m23
Matrix element (2,3)
|
double |
m24
Matrix element (2,4)
|
double |
m25
Matrix element (2,5)
|
double |
m30
Matrix element (3,0)
|
double |
m31
Matrix element (3,1)
|
double |
m32
Matrix element (3,2)
|
double |
m33
Matrix element (3,3)
|
double |
m34
Matrix element (3,4)
|
double |
m35
Matrix element (3,5)
|
double |
m40
Matrix element (4,0)
|
double |
m41
Matrix element (4,1)
|
double |
m42
Matrix element (4,2)
|
double |
m43
Matrix element (4,3)
|
double |
m44
Matrix element (4,4)
|
double |
m45
Matrix element (4,5)
|
double |
m50
Matrix element (5,0)
|
double |
m51
Matrix element (5,1)
|
double |
m52
Matrix element (5,2)
|
double |
m53
Matrix element (5,3)
|
double |
m54
Matrix element (5,4)
|
double |
m55
Matrix element (5,5)
|
INDEFINITE, POSITIVE_DEFINITE, SPD, SYMMETRIC
Constructor and Description |
---|
Matrix6dBase() |
Modifier and Type | Method and Description |
---|---|
Matrix6dBase |
clone() |
int |
colSize()
Returns the number of columns in this matrix (which is always 6).
|
double |
determinant()
Returns the determinant of this matrix
|
boolean |
epsilonEquals(Matrix6dBase M1,
double epsilon)
Returns true if the elements of this matrix equal those of matrix
M1 within a prescribed tolerance epsilon . |
boolean |
equals(Matrix6dBase M1)
Returns true if the elements of this matrix exactly equal those of matrix
M1 . |
double |
frobeniusNorm()
Returns the Frobenius norm of this matrix.
|
void |
get(double[] values)
Copies the elements of this matrix into an array of doubles.
|
double |
get(int i,
int j)
Gets a single element of this matrix.
|
void |
get(MatrixNd M)
Gets the contents of this matrix into a MatrixNd.
|
void |
getColumn(int j,
double[] values)
Copies a column of this matrix into an array of doubles.
|
void |
getColumn(int j,
double[] values,
int off)
Copies a column of this matrix into an array of doubles, starting at a
specified offset.
|
void |
getRow(int i,
double[] values)
Copies a row of this matrix into an array of doubles.
|
void |
getRow(int i,
double[] values,
int off)
Copies a row of this matrix into an array of doubles, starting at a
specified offset.
|
double |
infinityNorm()
Returns the infinity norm of this matrix.
|
boolean |
invert()
Inverts this matrix in place, returning false if the matrix is detected to
be singular.
|
void |
mul(VectorNd vr)
Multiplies this matrix by the column vector vr and places the result back
into vr.
|
void |
mul(VectorNd vr,
VectorNd v1)
Multiplies this matrix by the column vector v1 and places the result in
the vector vr.
|
boolean |
mulInverse(VectorNd vr)
Multiplies the column vector vr by the inverse of this matrix and places
the result back in vr.
|
boolean |
mulInverse(VectorNd vr,
VectorNd v1)
Multiplies the column vector v1 by the inverse of this matrix and places
the result in vr.
|
boolean |
mulInverseTranspose(VectorNd vr)
Multiplies the column vector vr by the inverse transpose of this matrix
and places the result back in vr.
|
boolean |
mulInverseTranspose(VectorNd vr,
VectorNd v1)
Multiplies the column vector v1 by the inverse transpose of this matrix
and places the result in vr.
|
void |
mulTranspose(VectorNd vr)
Multiplies the transpose of this matrix by the vector vr and places the
result back in vr.
|
void |
mulTranspose(VectorNd vr,
VectorNd v1)
Multiplies the transpose of this matrix by the vector v1 and places the
result in vr.
|
void |
negate()
Negates this matrix in place.
|
double |
oneNorm()
Returns the 1 norm of this matrix.
|
int |
rowSize()
Returns the number of rows in this matrix (which is always 6).
|
void |
scaledAdd(double s,
Matrix6dBase M1)
Computes s M1 and adds the result to this matrix.
|
void |
set(double[] vals)
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(Matrix M)
Sets the size and values of this matrix to those of another matrix.
|
void |
set(Matrix6dBase M)
Sets the values of this matrix to those of matrix M.
|
void |
setColumn(int j,
double[] values)
Sets a column of this matrix from an array of doubles.
|
void |
setIdentity()
Sets this matrix to the identity.
|
void |
setRow(int i,
double[] values)
Set a row of this matrix from an array of doubles.
|
void |
transpose()
Transposes this matrix in place.
|
add, checkConsistency, set, set, set, setCCSValues, setColumn, setCRSValues, setRandom, setRow, setSubMatrix
containsNaN, 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, writeToFile
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
epsilonEquals, 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, write
public double m00
public double m01
public double m02
public double m03
public double m04
public double m05
public double m10
public double m11
public double m12
public double m13
public double m14
public double m15
public double m20
public double m21
public double m22
public double m23
public double m24
public double m25
public double m30
public double m31
public double m32
public double m33
public double m34
public double m35
public double m40
public double m41
public double m42
public double m43
public double m44
public double m45
public double m50
public double m51
public double m52
public double m53
public double m54
public double m55
public final int rowSize()
rowSize
in interface LinearTransformNd
rowSize
in interface Matrix
rowSize
in class MatrixBase
public final int colSize()
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 indexpublic void get(double[] values)
(i,j)
is
stored at location i*colSize()+j
.get
in interface Matrix
get
in class MatrixBase
values
- array into which values are copiedpublic void get(MatrixNd M)
public void getColumn(int j, double[] values)
getColumn
in interface Matrix
getColumn
in class MatrixBase
j
- column indexvalues
- array into which the column is copiedpublic void getColumn(int j, double[] values, int off)
getColumn
in interface Matrix
getColumn
in class MatrixBase
j
- column indexvalues
- array into which the column is copiedoff
- offset in values where copying should beginpublic void getRow(int i, double[] values)
getRow
in interface Matrix
getRow
in class MatrixBase
i
- row indexvalues
- array into which the row is copiedpublic void getRow(int i, double[] values, int off)
getRow
in interface Matrix
getRow
in class MatrixBase
i
- row indexvalues
- array into which the row is copiedoff
- offset in values where copying should beginpublic 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 set(double[] vals)
(i,j)
is stored at location i*colSize()+j
.set
in interface DenseMatrix
set
in class DenseMatrixBase
vals
- array from which values are copiedpublic void setColumn(int j, double[] values)
setColumn
in interface DenseMatrix
setColumn
in class DenseMatrixBase
j
- column indexvalues
- array from which column values are copiedpublic void setRow(int i, double[] values)
setRow
in interface DenseMatrix
setRow
in class DenseMatrixBase
i
- row indexvalues
- array from which the row is copiedpublic void set(Matrix M)
set
in interface Matrix
set
in class DenseMatrixBase
M
- matrix whose size and values are copiedpublic void set(Matrix6dBase M)
M
- matrix whose values are to be copiedpublic void mul(VectorNd vr, VectorNd v1)
vr = M v1
mul
in interface LinearTransformNd
mul
in interface Matrix
mul
in class MatrixBase
vr
- result vectorv1
- vector to multiply bypublic void mul(VectorNd vr)
vr = M vr
vr
- vector to multiply (in place)public void mulTranspose(VectorNd vr, VectorNd v1)
vr = v1 M
mulTranspose
in interface Matrix
mulTranspose
in class MatrixBase
vr
- result vectorv1
- vector to multiply bypublic void mulTranspose(VectorNd vr)
vr = vr M
vr
- vector to multiply by (in place)public boolean mulInverse(VectorNd vr, VectorNd v1)
vr
- result vectorv1
- vector to multiply bypublic boolean mulInverse(VectorNd vr)
vr
- vector to multiply by (in place)public boolean mulInverseTranspose(VectorNd vr, VectorNd v1)
vr
- result vectorv1
- vector to multiply bypublic boolean mulInverseTranspose(VectorNd vr)
vr
- vector to multiply by (in place)public void scaledAdd(double s, Matrix6dBase M1)
s
- scaling factorM1
- matrix to be scaled and addedpublic void negate()
public void transpose()
public void setIdentity()
public boolean epsilonEquals(Matrix6dBase M1, double epsilon)
M1
within a prescribed tolerance epsilon
.M1
- matrix to compare withepsilon
- comparison tolerancepublic boolean equals(Matrix6dBase M1)
M1
.M1
- matrix to compare withpublic double infinityNorm()
infinityNorm
in interface Matrix
infinityNorm
in class MatrixBase
public double oneNorm()
oneNorm
in interface Matrix
oneNorm
in class MatrixBase
public double frobeniusNorm()
frobeniusNorm
in interface Matrix
frobeniusNorm
in class MatrixBase
public boolean invert()
public double determinant() throws ImproperSizeException
determinant
in interface Matrix
determinant
in class MatrixBase
ImproperSizeException
- if the matrix is not squarepublic Matrix6dBase clone()