public class Matrix3x1 extends DenseMatrixBase implements VectorObject<Matrix3x1>
Matrix.Partition, Matrix.WriteFormat| Modifier and Type | Field and Description |
|---|---|
double |
m00 |
double |
m10 |
double |
m20 |
static Matrix3x1 |
ZERO
Global zero matrix.
|
INDEFINITE, POSITIVE_DEFINITE, SPD, SYMMETRIC| Constructor and Description |
|---|
Matrix3x1()
Creates a new Matrix3x1.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
void |
add(Matrix3x1 M1,
Matrix3x1 M2)
Computes M1 + M2 and places the result in this matrix.
|
void |
addObj(Matrix3x1 M1)
Adds
v1 to this vector. |
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.
|
boolean |
epsilonEquals(Matrix3x1 M1,
double tol)
Returns true if the components of this vector are equal to those of
v1, within the tolerance tol. |
boolean |
equals(Matrix3x1 M1) |
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.
|
void |
mulAdd(Matrix M1,
Matrix M2)
Multiplies M1 by M2 and places the result in this matrix.
|
static void |
mulScaledTransposeRightAdd(Matrix3d MR,
double s,
Matrix3x1 M1,
Matrix3x1 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(Matrix3x1 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,
Matrix3x1 M)
Computes s M and places the result in this matrix.
|
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,
Matrix3x1 M1,
Matrix3x1 M2)
Computes s M1 + M2 and places the result in this matrix.
|
void |
scaledAdd(double s,
Vector3d v1)
Computes
s v1 and adds the result to this matrix. |
void |
scaledAddObj(double s,
Matrix3x1 M1)
Scales
v1 by s and adds it to this vector. |
void |
scaleObj(double s)
Scales this vector by
s. |
void |
set(double[] values)
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(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 |
setColumn(int j,
double[] values)
Sets a column of this matrix from an array of doubles.
|
void |
setRow(int i,
double[] values)
Set a row of this matrix from an array of doubles.
|
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.
|
void |
sub(Matrix3x1 M1,
Matrix3x1 M2)
Computes M1 - M2 places the result in this matrix.
|
void |
transpose(Matrix1x3 M)
Sets this matrix to the transpose of M
|
java.lang.String |
transposeToString() |
java.lang.String |
transposeToString(NumberFormat fmt) |
java.lang.String |
transposeToString(java.lang.String fmtStr) |
add, checkConsistency, set, set, set, setCCSValues, setColumn, setCRSValues, setRandom, setRow, setSubMatrixcontainsNaN, determinant, epsilonEquals, equals, frobeniusNorm, frobeniusNormSquared, get, get, getCCSIndices, getCCSIndices, getCCSIndices, getCCSValues, getCCSValues, getCCSValues, getColumn, getColumn, getColumn, getCRSIndices, getCRSIndices, getCRSIndices, getCRSValues, getCRSValues, getCRSValues, getDefaultFormat, getRow, getRow, 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, writeToFileequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetThreeVectorValueisWritable, scan, writedeterminant, epsilonEquals, equals, frobeniusNorm, frobeniusNormSquared, get, getCCSIndices, getCCSIndices, getCCSIndices, getCCSValues, getCCSValues, getCCSValues, getColumn, getColumn, getColumn, getCRSIndices, getCRSIndices, getCRSIndices, getCRSValues, getCRSValues, getCRSValues, getRow, getRow, 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, writepublic double m00
public double m10
public double m20
public static final Matrix3x1 ZERO
public int rowSize()
mul.rowSize in interface LinearTransformNdrowSize in interface MatrixrowSize in class MatrixBasepublic int colSize()
mul.colSize in interface LinearTransformNdcolSize in interface MatrixcolSize in class MatrixBasepublic double get(int i,
int j)
get in interface Matrixget in class MatrixBasei - element row indexj - element column indexpublic void get(Vector3d v)
v - vector to return contents inpublic void set(int i,
int j,
double value)
set in interface DenseMatrixset in class DenseMatrixBasei - element row indexj - element column indexvalue - element valuepublic void set(double[] values)
(i,j) is stored at location i*colSize()+j.set in interface DenseMatrixset in class DenseMatrixBasevalues - array from which values are copiedpublic void setColumn(int j,
double[] values)
setColumn in interface DenseMatrixsetColumn in class DenseMatrixBasej - column indexvalues - array from which column values are copiedpublic void setRow(int i,
double[] values)
setRow in interface DenseMatrixsetRow in class DenseMatrixBasei - row indexvalues - array from which the row is copiedpublic void setZero()
setZero in interface VectorObject<Matrix3x1>public void set(Matrix M)
DenseMatrixBaseset in interface Matrixset in class DenseMatrixBaseM - matrix whose size and values are copiedpublic void set(Matrix3x1 M)
set in interface VectorObject<Matrix3x1>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,
Matrix3x1 M)
s - scaling factorM - matrix to scalepublic 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 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(Matrix3x1 M)
M - matrix block to addpublic void add(Matrix3x1 M1, Matrix3x1 M2)
M1 - first matrix to addM2 - second matrix to addpublic void scaledAdd(double s,
Matrix3x1 M)
M - matrix block to addpublic void scaledAdd(double s,
Matrix3x1 M1,
Matrix3x1 M2)
s - scaling factorM1 - matrix to be scaledM2 - matrix to be addedpublic void negate(Matrix3x1 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(Matrix3x1 M)
M - matrix block to subtractpublic void sub(Matrix3x1 M1, Matrix3x1 M2)
M1 - first matrixM2 - matrix to subtractpublic double dot(Vector3d v)
v - vector to take dot product withpublic 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, 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 void transpose(Matrix1x3 M)
M - matrix to take the transpose ofpublic Matrix3x1 clone()
public void scaleObj(double s)
s.scaleObj in interface VectorObject<Matrix3x1>public void addObj(Matrix3x1 M1)
v1 to this vector.addObj in interface VectorObject<Matrix3x1>public void scaledAddObj(double s,
Matrix3x1 M1)
v1 by s and adds it to this vector.scaledAddObj in interface VectorObject<Matrix3x1>public boolean equals(Matrix3x1 M1)
public boolean epsilonEquals(Matrix3x1 M1, double tol)
v1, within the tolerance tol. If tol = 0, then
exact equality is required.epsilonEquals in interface VectorObject<Matrix3x1>