public class Matrix3x4 extends DenseMatrixBase implements VectorObject<Matrix3x4>
Matrix.Partition, Matrix.WriteFormat
Modifier and Type | Field and Description |
---|---|
double |
m00 |
double |
m01 |
double |
m02 |
double |
m03 |
double |
m10 |
double |
m11 |
double |
m12 |
double |
m13 |
double |
m20 |
double |
m21 |
double |
m22 |
double |
m23 |
static Matrix3x4 |
ZERO
Global zero matrix.
|
INDEFINITE, POSITIVE_DEFINITE, SPD, SYMMETRIC
Constructor and Description |
---|
Matrix3x4()
Creates a new Matrix3x4.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Matrix M)
Adds this matrix to M and places the result in this matrix.
|
void |
add(Matrix3x4 M)
Adds the contents of a Matrix3x4 to this matrix block.
|
void |
add(Matrix3x4 M1,
Matrix3x4 M2)
Computes M1 + M2 and places the result in this matrix.
|
void |
addObj(Matrix3x4 M1)
Adds
v1 to this vector. |
void |
addSubMatrix00(Vector3d v)
Adds v to the 3x1 sub-matrix starting at (0, 0).
|
void |
addSubMatrix01(Matrix3d M)
Adds M to the 3x3 sub-matrix starting at (0, 1)
|
Matrix3x4 |
clone()
Creates a clone of this matrix.
|
int |
colSize()
Number of columns in the matrix associated with this transformation.
|
boolean |
epsilonEquals(Matrix3x4 M1,
double epsilon)
Returns true if the components of this vector are equal to those of
v1 , within the tolerance tol . |
boolean |
equals(Matrix3x4 M1) |
double |
get(int i,
int j)
Gets a single element of this matrix.
|
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 |
getColumn(int j,
Vector3d col)
Copies a column of this matrix into a 3-vector.
|
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.
|
void |
mul(Point3d vr,
Vector4d v1)
Multiples this matrix by the vector v1 and places the result in vr
|
void |
mulAdd(Matrix M1,
Matrix M2)
Multiplies M1 by M2 and places the result in this matrix.
|
static void |
mulScaledTransposeRightAdd(Matrix3d MR,
Matrix3x4 M1,
double[] D,
Matrix3x4 M2)
Computes
|
void |
mulTransposeLeftAdd(Matrix M1,
Matrix M2)
Multiplies M1^T by 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()
Negates this matrix in place.
|
void |
negate(Matrix3x4 M)
Sets this matrix to the negative of M.
|
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,
Matrix3x4 M)
Computes s M and places the result in this matrix.
|
void |
scaledAdd(double s,
Matrix M)
Scales the matrix M and add the result to this matrix.
|
void |
scaledAdd(double s,
Matrix3x4 M)
Computes s M and adds the result to this matrix.
|
void |
scaledAdd(double s,
Matrix3x4 M1,
Matrix3x4 M2)
Computes s M1 + M2 and places the result in this matrix.
|
void |
scaledAddObj(double s,
Matrix3x4 M1)
Scales
v1 by s and adds it to this vector. |
void |
scaleObj(double s)
Scales this vector by
s . |
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(Matrix3x4 M)
Sets the contents of this Matrix3x4 to those of a specified block.
|
void |
setColumn(int j,
double[] values)
Sets a column of this matrix from an array of doubles.
|
void |
setColumn(int j,
Vector3d col)
Sets a column of this matrix to the specified 3-vector.
|
void |
setRow(int i,
double[] values)
Set a row of this matrix from an array of doubles.
|
void |
setSubMatrix00(Vector3d v)
Sets the 3x1 sub-matrix starting at (0, 0) to v
|
void |
setSubMatrix01(Matrix3d M)
Sets the 3x3 sub-matrix starting at (0, 1) to M
|
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(Matrix3x4 M)
Subtracts the contents of a Matrix3x4 from this matrix block.
|
void |
sub(Matrix3x4 M1,
Matrix3x4 M2)
Computes M1 - M2 places the result in this matrix.
|
void |
transpose(Matrix4x3 M)
Sets this matrix to the transpose of M
|
add, checkConsistency, set, set, set, set, setCCSValues, setColumn, setCRSValues, setRandom, setRow, setSubMatrix
containsNaN, determinant, epsilonEquals, equals, frobeniusNorm, frobeniusNormSquared, get, get, getCCSIndices, getCCSIndices, getCCSIndices, getCCSValues, getCCSValues, getCCSValues, getColumn, getCRSIndices, getCRSIndices, getCRSIndices, getCRSValues, getCRSValues, getCRSValues, getDefaultFormat, getRow, getSize, getSubMatrix, hasNaN, idString, infinityNorm, isFixedSize, isSymmetric, isWritable, maxNorm, mul, mul, mul, mulAdd, mulAdd, mulAdd, mulTranspose, mulTranspose, mulTranspose, mulTransposeAdd, mulTransposeAdd, mulTransposeAdd, numNonZeroVals, numNonZeroVals, oneNorm, 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
getThreeVectorValue
isWritable, scan, write
determinant, epsilonEquals, equals, frobeniusNorm, frobeniusNormSquared, get, getCCSIndices, getCCSIndices, getCCSIndices, getCCSValues, getCCSValues, getCCSValues, getColumn, getCRSIndices, getCRSIndices, getCRSIndices, getCRSValues, getCRSValues, getCRSValues, getRow, getSize, getSubMatrix, infinityNorm, isFixedSize, isSymmetric, maxNorm, mul, mul, mul, mulAdd, mulAdd, mulAdd, mulTranspose, mulTranspose, mulTranspose, mulTransposeAdd, mulTransposeAdd, mulTransposeAdd, numNonZeroVals, numNonZeroVals, oneNorm, scan, setSize, toString, toString, trace, write, write, write
public double m00
public double m01
public double m02
public double m03
public double m10
public double m11
public double m12
public double m13
public double m20
public double m21
public double m22
public double m23
public static final Matrix3x4 ZERO
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 indexpublic 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 getColumn(int j, Vector3d col)
j
- column indexcol
- 3-vector into which the column is copiedpublic 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 setRow(int i, double[] values)
setRow
in interface DenseMatrix
setRow
in class DenseMatrixBase
i
- row indexvalues
- array from which the row is 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 setColumn(int j, Vector3d col)
j
- column indexcol
- 3-vector from which the column is copiedpublic void setZero()
setZero
in interface VectorObject<Matrix3x4>
public void set(Matrix M)
DenseMatrixBase
set
in interface Matrix
set
in class DenseMatrixBase
M
- matrix whose size and values are copiedpublic void set(Matrix3x4 M)
set
in interface VectorObject<Matrix3x4>
M
- matrix block providing new valuespublic void addSubMatrix00(Vector3d v)
v
- values to add to the sub-matrixpublic void addSubMatrix01(Matrix3d M)
M
- values to add to the sub-matrixpublic void setSubMatrix00(Vector3d v)
v
- new sub-matrix valuespublic void setSubMatrix01(Matrix3d M)
M
- new sub-matrix valuespublic void scale(double s)
s
.s
- scaling factorpublic void scale(double s, Matrix3x4 M)
s
- scaling factorM
- matrix to scalepublic void add(Matrix M)
M
- right-hand matrixImproperSizeException
- if this matrix and M have different sizespublic void scaledAdd(double s, Matrix M)
s
- scaling factorM
- matrix to be scaled and addedImproperSizeException
- if this matrix and M have different sizespublic void add(Matrix3x4 M)
M
- matrix block to addpublic void add(Matrix3x4 M1, Matrix3x4 M2)
M1
- first matrix to addM2
- second matrix to addpublic void scaledAdd(double s, Matrix3x4 M)
s
- scaling factorM
- matrix to be scaled and addedpublic void scaledAdd(double s, Matrix3x4 M1, Matrix3x4 M2)
s
- scaling factorM1
- matrix to be scaledM2
- matrix to be addedpublic void negate(Matrix3x4 M)
M
- matrix to negatepublic void negate()
public void sub(Matrix M)
M
- right-hand matrixImproperSizeException
- if this matrix and M have different sizespublic void sub(Matrix3x4 M)
M
- matrix block to subtractpublic void sub(Matrix3x4 M1, Matrix3x4 M2)
M1
- first matrixM2
- matrix to subtractpublic 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 static void mulScaledTransposeRightAdd(Matrix3d MR, Matrix3x4 M1, double[] D, Matrix3x4 M2)
M1 D M2^T
where D is a diagonal matrix, and adds the result to matrix MR.
MR
- matrix to add result toM1
- left matrixD
- diagonal matrix valuesM2
- right matrix transposepublic void transpose(Matrix4x3 M)
M
- matrix to take the transpose ofpublic void mul(Point3d vr, Vector4d v1)
vr
- result of multiplicationv1
- vector to transformpublic Matrix3x4 clone()
public void scaleObj(double s)
s
.scaleObj
in interface VectorObject<Matrix3x4>
public void addObj(Matrix3x4 M1)
v1
to this vector.addObj
in interface VectorObject<Matrix3x4>
public void scaledAddObj(double s, Matrix3x4 M1)
v1
by s
and adds it to this vector.scaledAddObj
in interface VectorObject<Matrix3x4>
public boolean epsilonEquals(Matrix3x4 M1, double epsilon)
v1
, within the tolerance tol
. If tol
= 0, then
exact equality is required.epsilonEquals
in interface VectorObject<Matrix3x4>
public boolean equals(Matrix3x4 M1)