public final class Matrix3D extends Object implements Serializable
This is a real 3x3 matrix designed to be used in geometric calculations. It is compatible with the Vector3D type.
Vector3D
,
Serialized FormCreation with a double[][] data : Matrix3D matrix = new Matrix3D(data); Multiplication with a Vector3D : Vector3D result = matrix.multiply(vector3D);
Constructor and Description |
---|
Matrix3D(double[][] dataIn)
Constructor
Needs the data to fill the matrix. |
Matrix3D(RealMatrix matrix)
Constructor
Creates a Matrix3D with a RealMatrix. |
Matrix3D(Vector3D vector)
Constructor
Builds a cross product matrix M from a vector u such as : M(u) * v = u^v |
Modifier and Type | Method and Description |
---|---|
Matrix3D |
add(Matrix3D added)
Computes the addition of two Matrix3D
|
boolean |
equals(Object other)
Asserts two Matrix3D to be equal.
|
double[][] |
getData() |
double |
getEntry(int row,
int column)
Returns the value of one entry of the matrix
|
RealMatrix |
getRealMatrix() |
int |
hashCode()
Get a hashCode for the 3D matrix.
|
boolean |
isNaN()
Returns true if any entry of this matrix is NaN; false otherwise
|
boolean |
isOrthogonal(double thresholdNorm,
double thresholdOrthogonality)
Given a threshold, is this an orthogonal matrix?
|
Matrix3D |
multiply(double x)
Computes a multiplication of this Matrix3D with a scalar
|
Matrix3D |
multiply(Matrix3D mult)
Computes a matrix multiplication between two Matrix3D objects
|
Vector3D |
multiply(Vector3D mult)
Computes the multiplication between a Matrix3D and a Vector3D
|
Matrix3D |
subtract(Matrix3D sub)
Computes the subtraction of a Matrix3D to this one
|
String |
toString()
Get a string representation for this matrix.
|
Matrix3D |
transpose()
Computes the transposition of this Matrix3D
|
Vector3D |
transposeAndMultiply(Vector3D vector)
Computes the multiplication of the transposed matrix of this Matrix3D with a Vector3D
|
public Matrix3D(double[][] dataIn)
dataIn
- data to fill the matrixpublic Matrix3D(RealMatrix matrix)
matrix
- RealMatrix to transformpublic Matrix3D multiply(Matrix3D mult)
mult
- the Matrix3D right term of the multiplicationpublic Matrix3D add(Matrix3D added)
added
- the Matrix3D to be addedpublic Matrix3D transpose()
public Matrix3D subtract(Matrix3D sub)
sub
- the Matrix3D to be subtractedpublic Vector3D multiply(Vector3D mult)
mult
- the Vector3D right term of the multiplicationpublic Matrix3D multiply(double x)
x
- the Matrix3D right term of the multiplicationpublic Vector3D transposeAndMultiply(Vector3D vector)
vector
- the Vector3D right term of the multiplicationpublic boolean isOrthogonal(double thresholdNorm, double thresholdOrthogonality)
thresholdNorm
- : allowed error with respect to the normality of the vectorsthresholdOrthogonality
- : allowed error with respect to the mutual orthogonality of the vectorspublic double[][] getData()
public RealMatrix getRealMatrix()
public boolean equals(Object other)
public int hashCode()
All NaN values have the same hash code.
public boolean isNaN()
public String toString()
public double getEntry(int row, int column)
row
- the row of the wanted datacolumn
- the column of the wanted dataCopyright © 2019 CNES. All rights reserved.