- java.lang.Object
-
- org.arakhne.afc.math.matrix.Matrix2d
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class Matrix2d extends Object implements Serializable, Cloneable
Is represented internally as a 2x2 floating point matrix. The mathematical representation is row major, as in traditional matrix mathematics.- Version:
- 17.0 2020-01-04 14:41:43
- Author:
- Stéphane GALLAND
- See Also:
- Serialized Form
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathgeom
-
-
Field Summary
Fields Modifier and Type Field Description protected Boolean
isIdentity
Indicates if the matrix is identity.protected double
m00
The first matrix element in the first row.protected double
m01
The second matrix element in the first row.protected double
m10
The first matrix element in the second row.protected double
m11
The second matrix element in the second row.
-
Constructor Summary
Constructors Constructor Description Matrix2d()
Constructs and initializes a Matrix2f to all zeros.Matrix2d(double[] matrix)
Constructs and initializes a Matrix2f from the specified nine- element array.Matrix2d(double m00, double m01, double m10, double m11)
Constructs and initializes a Matrix2f from the specified nine values.Matrix2d(Matrix2d matrix)
Constructs a new matrix with the same values as the Matrix2f parameter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Matrix2d
$bang()
Replies the transposition of this matrix:!this
.Matrix2d
$div(double scalar)
Replies the division of this matrix by the given scalar:this / scalar
.Matrix2d
$minus()
Replies the negation of this matrix:-this
.Matrix2d
$minus(double scalar)
Replies the substraction of the given scalar to this matrix:this - scalar
.Matrix2d
$minus(Matrix2d matrix)
Replies the substraction of the given matrix to this matrix:this + matrix
.Matrix2d
$plus(double scalar)
Replies the addition of the given scalar to this matrix:this + scalar
.Matrix2d
$plus(Matrix2d matrix)
Replies the addition of the given matrix to this matrix:this + matrix
.Matrix2d
$times(double scalar)
Replies the multiplication of the given scalar and this matrix:this * scalar
.Matrix2d
$times(Matrix2d matrix)
Replies the multiplication of the given matrix and this matrix:this * matrix
.void
add(double scalar)
Adds a scalar to each component of this matrix.void
add(double scalar, Matrix2d matrix)
Adds a scalar to each component of the matrix m1 and places the result into this.void
add(Matrix2d matrix)
Sets the value of this matrix to the sum of itself and matrix m1.void
add(Matrix2d matrix1, Matrix2d matrix2)
Sets the value of this matrix to the matrix sum of matrices m1 and m2.Matrix2d
clone()
Creates a new object of the same class as this object.boolean
cov(Vector2D<?,?> result, Iterable<? extends Tuple2D<?>> tuples)
Set this matrix with the covariance matrix's elements for the given set of tuples.boolean
cov(Vector2D<?,?> result, Point2D<?,?>... tuples)
Set this matrix with the covariance matrix's elements for the given set of tuples.boolean
cov(Vector2D<?,?> result, Vector2D<?,?>... tuples)
Set this matrix with the covariance matrix's elements for the given set of tuples.double
determinant()
Computes the determinant of this matrix.double[]
eigenVectorsOfSymmetricMatrix(Matrix2d eigenVectors)
Compute the eigenvectors of this matrix, assuming it is a symmetric matrix according to the Jacobi Cyclic Method.boolean
equals(Object object)
Returns true if the Object t1 is of type Matrix2f and all of the data members of t1 are equal to the corresponding data members in this Matrix2f.boolean
equals(Matrix2d matrix)
Returns true if all of the data members of Matrix2f m1 are equal to the corresponding data members in this Matrix2f.void
getColumn(int column, double[] vector)
Copies the matrix values in the specified column into the array parameter.void
getColumn(int column, Tuple2D<?> vector)
Copies the matrix values in the specified column into the vector parameter.double
getElement(int row, int column)
Retrieves the value at the specified row and column of the specified matrix.double
getM00()
Get the first matrix element in the first row.double
getM01()
Get the second matrix element in the first row.double
getM10()
Get first matrix element in the second row.double
getM11()
Get second matrix element in the second row.void
getRow(int row, double[] vector)
Copies the matrix values in the specified row into the array parameter.void
getRow(int row, Tuple2D<?> vector)
Copies the matrix values in the specified row into the vector parameter.int
hashCode()
Returns a hash code value based on the data values in this object.boolean
isIdentity()
Replies if the matrix is identity.boolean
isSymmetric()
Replies if the matrix is symmetric.void
mul(double scalar)
Multiplies each element of this matrix by a scalar.void
mul(double scalar, Matrix2d matrix)
Multiplies each element of matrix m1 by a scalar and places the result into this.void
mul(Tuple2D<?> vector, Tuple2D<?> result)
Multiply this matrix by the given vector v and set the resulting vector.void
mul(Matrix2d matrix)
Sets the value of this matrix to the result of multiplying itself with matrix m1.void
mul(Matrix2d matrix1, Matrix2d matrix2)
Sets the value of this matrix to the result of multiplying the two argument matrices together.void
mulTransposeBoth(Matrix2d matrix1, Matrix2d matrix2)
Multiplies the transpose of matrix m1 times the transpose of matrix m2, and places the result into this.void
mulTransposeLeft(Matrix2d matrix1, Matrix2d matrix2)
Multiplies the transpose of matrix m1 times matrix m2, and places the result into this.void
mulTransposeRight(Matrix2d matrix1, Matrix2d matrix2)
Multiplies matrix m1 times the transpose of matrix m2, and places the result into this.void
negate()
Negates the value of this matrix: this = -this.void
negate(Matrix2d matrix)
Sets the value of this matrix equal to the negation of of the Matrix2f parameter.void
normalizeCP()
Perform cross product normalization of this matrix.void
normalizeCP(Matrix2d matrix)
Perform cross product normalization of matrix m1 and place the normalized values into this.void
operator_add(double scalar)
Add the given scalar to this matrix:this += scalar
.void
operator_add(Matrix2d matrix)
Add the given matrix to this matrix:this += matrix
.Matrix2d
operator_divide(double scalar)
Replies the division of this matrix by the given scalar:this / scalar
.Matrix2d
operator_minus()
Replies the negation of this matrix:-this
.Matrix2d
operator_minus(double scalar)
Replies the substraction of the given scalar to this matrix:this - scalar
.Matrix2d
operator_minus(Matrix2d matrix)
Replies the substraction of the given matrix to this matrix:this + matrix
.void
operator_moinsMoins()
Increment this matrix:this--
.Matrix2d
operator_multiply(double scalar)
Replies the multiplication of the given scalar and this matrix:this * scalar
.Matrix2d
operator_multiply(Matrix2d matrix)
Replies the multiplication of the given matrix and this matrix:this * matrix
.Matrix2d
operator_not()
Replies the transposition of this matrix:!this
.Matrix2d
operator_plus(double scalar)
Replies the addition of the given scalar to this matrix:this + scalar
.Matrix2d
operator_plus(Matrix2d matrix)
Replies the addition of the given matrix to this matrix:this + matrix
.void
operator_plusPlus()
Increment this matrix:this++
.void
operator_remove(double scalar)
Substract the given scalar to this matrix:this -= scalar
.void
operator_remove(Matrix2d matrix)
Substract the given matrix to this matrix:this -= matrix
.void
set(double[] matrix)
Sets the values in this Matrix2f equal to the row-major array parameter (ie, the first two elements of the array will be copied into the first row of this matrix, etc.).void
set(double m00, double m01, double m10, double m11)
Set the components of the matrix.void
set(Matrix2d matrix)
Sets the value of this matrix to the value of the Matrix2f argument.void
setColumn(int column, double[] vector)
Sets the specified column of this Matrix2f to the two values provided.void
setColumn(int column, double x, double y)
Sets the specified column of this Matrix2f to the two values provided.void
setColumn(int column, Tuple2D<?> vector)
Sets the specified column of this Matrix2f to the vector provided.void
setDiagonal(double m00, double m11)
Sets this matrix as diagonal.void
setElement(int row, int column, double value)
Sets the specified element of this Matrix2f to the value provided.void
setIdentity()
Sets this Matrix2f to identity.void
setM00(double m00)
Set the first matrix element in the first row.void
setM01(double m01)
Set the second matrix element in the first row.void
setM10(double m10)
Set first matrix element in the second row.void
setM11(double m11)
Set the second matrix element in the second row.void
setRow(int row, double[] vector)
Sets the specified row of this Matrix2f to the two values provided.void
setRow(int row, double x, double y)
Sets the specified row of this Matrix2f to the 4 values provided.void
setRow(int row, Tuple2D<?> vector)
Sets the specified row of this Matrix2f to the Vector provided.void
setZero()
Sets this matrix to all zeros.void
sub(Matrix2d matrix)
Sets the value of this matrix to the matrix difference of itself and matrix m1 (this = this - m1).void
sub(Matrix2d matrix1, Matrix2d matrix2)
Sets the value of this matrix to the matrix difference of matrices m1 and m2.String
toString()
Returns a string that contains the values of this Matrix2f.void
transpose()
Sets the value of this matrix to its transpose.void
transpose(Matrix2d matrix)
Sets the value of this matrix to the transpose of the argument matrix.
-
-
-
Field Detail
-
m00
protected double m00
The first matrix element in the first row.
-
m01
protected double m01
The second matrix element in the first row.
-
m10
protected double m10
The first matrix element in the second row.
-
m11
protected double m11
The second matrix element in the second row.
-
isIdentity
protected Boolean isIdentity
Indicates if the matrix is identity. Ifnull
the identity flag must be determined.
-
-
Constructor Detail
-
Matrix2d
public Matrix2d(double m00, double m01, double m10, double m11)
Constructs and initializes a Matrix2f from the specified nine values.- Parameters:
m00
- the [0][0] elementm01
- the [0][1] elementm10
- the [1][0] elementm11
- the [1][1] element
-
Matrix2d
public Matrix2d(double[] matrix)
Constructs and initializes a Matrix2f from the specified nine- element array.- Parameters:
matrix
- the array of length 4 containing in order
-
Matrix2d
public Matrix2d(Matrix2d matrix)
Constructs a new matrix with the same values as the Matrix2f parameter.- Parameters:
matrix
- the source matrix
-
Matrix2d
public Matrix2d()
Constructs and initializes a Matrix2f to all zeros.
-
-
Method Detail
-
toString
@Pure public String toString()
Returns a string that contains the values of this Matrix2f.
-
setIdentity
public final void setIdentity()
Sets this Matrix2f to identity.
-
setElement
public final void setElement(int row, int column, double value)
Sets the specified element of this Matrix2f to the value provided.- Parameters:
row
- the row number to be modified (zero indexed)column
- the column number to be modified (zero indexed)value
- the new value
-
getElement
@Pure public final double getElement(int row, int column)
Retrieves the value at the specified row and column of the specified matrix.- Parameters:
row
- the row number to be retrieved (zero indexed)column
- the column number to be retrieved (zero indexed)- Returns:
- the value at the indexed element.
-
getRow
public final void getRow(int row, Tuple2D<?> vector)
Copies the matrix values in the specified row into the vector parameter.- Parameters:
row
- the matrix rowvector
- the vector into which the matrix row values will be copied
-
getRow
public final void getRow(int row, double[] vector)
Copies the matrix values in the specified row into the array parameter.- Parameters:
row
- the matrix rowvector
- the array into which the matrix row values will be copied
-
getColumn
public final void getColumn(int column, Tuple2D<?> vector)
Copies the matrix values in the specified column into the vector parameter.- Parameters:
column
- the matrix columnvector
- the vector into which the matrix row values will be copied
-
getColumn
public final void getColumn(int column, double[] vector)
Copies the matrix values in the specified column into the array parameter.- Parameters:
column
- the matrix columnvector
- the array into which the matrix row values will be copied
-
setRow
public final void setRow(int row, double x, double y)
Sets the specified row of this Matrix2f to the 4 values provided.- Parameters:
row
- the row number to be modified (zero indexed)x
- the first column elementy
- the second column element
-
setRow
public final void setRow(int row, Tuple2D<?> vector)
Sets the specified row of this Matrix2f to the Vector provided.- Parameters:
row
- the row number to be modified (zero indexed)vector
- the replacement row
-
setRow
public final void setRow(int row, double[] vector)
Sets the specified row of this Matrix2f to the two values provided.- Parameters:
row
- the row number to be modified (zero indexed)vector
- the replacement row
-
setColumn
public final void setColumn(int column, double x, double y)
Sets the specified column of this Matrix2f to the two values provided.- Parameters:
column
- the column number to be modified (zero indexed)x
- the first row elementy
- the second row element
-
setColumn
public final void setColumn(int column, Tuple2D<?> vector)
Sets the specified column of this Matrix2f to the vector provided.- Parameters:
column
- the column number to be modified (zero indexed)vector
- the replacement column
-
setColumn
public final void setColumn(int column, double[] vector)
Sets the specified column of this Matrix2f to the two values provided.- Parameters:
column
- the column number to be modified (zero indexed)vector
- the replacement column
-
add
public final void add(double scalar)
Adds a scalar to each component of this matrix.- Parameters:
scalar
- the scalar adder
-
add
public final void add(double scalar, Matrix2d matrix)
Adds a scalar to each component of the matrix m1 and places the result into this. Matrix m1 is not modified.- Parameters:
scalar
- the scalar addermatrix
- the original matrix values
-
add
public final void add(Matrix2d matrix1, Matrix2d matrix2)
Sets the value of this matrix to the matrix sum of matrices m1 and m2.- Parameters:
matrix1
- the first matrixmatrix2
- the second matrix
-
add
public final void add(Matrix2d matrix)
Sets the value of this matrix to the sum of itself and matrix m1.- Parameters:
matrix
- the other matrix
-
sub
public final void sub(Matrix2d matrix1, Matrix2d matrix2)
Sets the value of this matrix to the matrix difference of matrices m1 and m2.- Parameters:
matrix1
- the first matrixmatrix2
- the second matrix
-
sub
public final void sub(Matrix2d matrix)
Sets the value of this matrix to the matrix difference of itself and matrix m1 (this = this - m1).- Parameters:
matrix
- the other matrix
-
transpose
public final void transpose()
Sets the value of this matrix to its transpose.
-
transpose
public final void transpose(Matrix2d matrix)
Sets the value of this matrix to the transpose of the argument matrix.- Parameters:
matrix
- the matrix to be transposed
-
set
public final void set(Matrix2d matrix)
Sets the value of this matrix to the value of the Matrix2f argument.- Parameters:
matrix
- the source Matrix2f
-
set
public final void set(double[] matrix)
Sets the values in this Matrix2f equal to the row-major array parameter (ie, the first two elements of the array will be copied into the first row of this matrix, etc.).- Parameters:
matrix
- the double precision array of length 4
-
set
public void set(double m00, double m01, double m10, double m11)
Set the components of the matrix.- Parameters:
m00
- the [0][0] elementm01
- the [0][1] elementm10
- the [1][0] elementm11
- the [1][1] element
-
determinant
@Pure public final double determinant()
Computes the determinant of this matrix.- Returns:
- the determinant of the matrix
-
mul
public final void mul(double scalar)
Multiplies each element of this matrix by a scalar.- Parameters:
scalar
- The scalar multiplier.
-
mul
public final void mul(double scalar, Matrix2d matrix)
Multiplies each element of matrix m1 by a scalar and places the result into this. Matrix m1 is not modified.- Parameters:
scalar
- the scalar multipliermatrix
- the original matrix
-
mul
public final void mul(Matrix2d matrix)
Sets the value of this matrix to the result of multiplying itself with matrix m1.- Parameters:
matrix
- the other matrix
-
mul
@Pure public final void mul(Tuple2D<?> vector, Tuple2D<?> result)
Multiply this matrix by the given vector v and set the resulting vector.- Parameters:
vector
- the input vectorresult
- is set with (this * v).
-
mul
public final void mul(Matrix2d matrix1, Matrix2d matrix2)
Sets the value of this matrix to the result of multiplying the two argument matrices together.- Parameters:
matrix1
- the first matrixmatrix2
- the second matrix
-
mulTransposeBoth
public final void mulTransposeBoth(Matrix2d matrix1, Matrix2d matrix2)
Multiplies the transpose of matrix m1 times the transpose of matrix m2, and places the result into this.- Parameters:
matrix1
- the matrix on the left hand side of the multiplicationmatrix2
- the matrix on the right hand side of the multiplication
-
mulTransposeRight
public final void mulTransposeRight(Matrix2d matrix1, Matrix2d matrix2)
Multiplies matrix m1 times the transpose of matrix m2, and places the result into this.- Parameters:
matrix1
- the matrix on the left hand side of the multiplicationmatrix2
- the matrix on the right hand side of the multiplication
-
mulTransposeLeft
public final void mulTransposeLeft(Matrix2d matrix1, Matrix2d matrix2)
Multiplies the transpose of matrix m1 times matrix m2, and places the result into this.- Parameters:
matrix1
- the matrix on the left hand side of the multiplicationmatrix2
- the matrix on the right hand side of the multiplication
-
normalizeCP
public final void normalizeCP()
Perform cross product normalization of this matrix.
-
normalizeCP
public final void normalizeCP(Matrix2d matrix)
Perform cross product normalization of matrix m1 and place the normalized values into this.- Parameters:
matrix
- Provides the matrix values to be normalized
-
equals
@Pure public boolean equals(Matrix2d matrix)
Returns true if all of the data members of Matrix2f m1 are equal to the corresponding data members in this Matrix2f.- Parameters:
matrix
- the matrix with which the comparison is made- Returns:
- true or false
-
equals
@Pure public boolean equals(Object object)
Returns true if the Object t1 is of type Matrix2f and all of the data members of t1 are equal to the corresponding data members in this Matrix2f.
-
hashCode
@Pure public int hashCode()
Returns a hash code value based on the data values in this object. Two different Matrix2f objects with identical data values (i.e., Matrix2f.equals returns true) will return the same hash code value. Two objects with different data members may return the same hash value, although this is not likely.
-
setZero
public final void setZero()
Sets this matrix to all zeros.
-
setDiagonal
public final void setDiagonal(double m00, double m11)
Sets this matrix as diagonal.- Parameters:
m00
- the first element of the diagonalm11
- the second element of the diagonal
-
negate
public final void negate()
Negates the value of this matrix: this = -this.
-
negate
public final void negate(Matrix2d matrix)
Sets the value of this matrix equal to the negation of of the Matrix2f parameter.- Parameters:
matrix
- the source matrix
-
clone
@Pure public Matrix2d clone()
Creates a new object of the same class as this object.- Overrides:
clone
in classObject
- Returns:
- a clone of this instance.
- Throws:
OutOfMemoryError
- if there is not enough memory.- See Also:
Cloneable
-
getM00
@Pure public final double getM00()
Get the first matrix element in the first row.- Returns:
- Returns the m00.
-
setM00
public final void setM00(double m00)
Set the first matrix element in the first row.- Parameters:
m00
- The m00 to set.
-
getM01
@Pure public final double getM01()
Get the second matrix element in the first row.- Returns:
- Returns the m01.
-
setM01
public final void setM01(double m01)
Set the second matrix element in the first row.- Parameters:
m01
- The m01 to set.
-
getM10
@Pure public final double getM10()
Get first matrix element in the second row.- Returns:
- Returns the m10.
-
setM10
public final void setM10(double m10)
Set first matrix element in the second row.- Parameters:
m10
- The m10 to set.
-
getM11
@Pure public final double getM11()
Get second matrix element in the second row.- Returns:
- Returns the m11.
-
setM11
public final void setM11(double m11)
Set the second matrix element in the second row.- Parameters:
m11
- The m11 to set.
-
cov
public final boolean cov(Vector2D<?,?> result, Vector2D<?,?>... tuples)
Set this matrix with the covariance matrix's elements for the given set of tuples.- Parameters:
result
- the mean of the tuples.tuples
- the input tuples.- Returns:
true
if the covariance matrix could be computed.
-
cov
public final boolean cov(Vector2D<?,?> result, Point2D<?,?>... tuples)
Set this matrix with the covariance matrix's elements for the given set of tuples.- Parameters:
result
- the mean of the tuples.tuples
- the input tuples.- Returns:
true
if the covariance matrix could be computed.
-
cov
public boolean cov(Vector2D<?,?> result, Iterable<? extends Tuple2D<?>> tuples)
Set this matrix with the covariance matrix's elements for the given set of tuples.- Parameters:
result
- the mean of the tuples.tuples
- the input tuples.- Returns:
true
if the covariance matrix could be computed.
-
isSymmetric
@Pure public boolean isSymmetric()
Replies if the matrix is symmetric.- Returns:
true
if the matrix is symmetric, otherwisefalse
-
eigenVectorsOfSymmetricMatrix
public double[] eigenVectorsOfSymmetricMatrix(Matrix2d eigenVectors)
Compute the eigenvectors of this matrix, assuming it is a symmetric matrix according to the Jacobi Cyclic Method.- Parameters:
eigenVectors
- are the matrix of vectors to fill. Eigen vectors are the columns of the matrix.- Returns:
- the eigenvalues which are corresponding to the
eigenVectors
columns. - See Also:
eigenVectorsOfSymmetricMatrix(Matrix2d)
-
isIdentity
@Pure public boolean isIdentity()
Replies if the matrix is identity.This function uses the equal-to-zero test with the error
Math.ulp(double)
.- Returns:
true
if the matrix is identity;false
otherwise.- See Also:
MathUtil.isEpsilonZero(double)
,MathUtil.isEpsilonEqual(double, double)
-
operator_add
public void operator_add(Matrix2d matrix)
Add the given matrix to this matrix:this += matrix
.This function is an implementation of the operator for the languages that defined or based on the Xtext framework.
- Parameters:
matrix
- the matrix.- See Also:
add(Matrix2d)
-
operator_add
public void operator_add(double scalar)
Add the given scalar to this matrix:this += scalar
.This function is an implementation of the operator for the languages that defined or based on the Xtext framework.
- Parameters:
scalar
- the scalar.- See Also:
add(double)
-
operator_remove
public void operator_remove(Matrix2d matrix)
Substract the given matrix to this matrix:this -= matrix
.This function is an implementation of the operator for the languages that defined or based on the Xtext framework.
- Parameters:
matrix
- the matrix.- See Also:
sub(Matrix2d)
-
operator_remove
public void operator_remove(double scalar)
Substract the given scalar to this matrix:this -= scalar
.This function is an implementation of the operator for the languages that defined or based on the Xtext framework.
- Parameters:
scalar
- the scalar.- See Also:
add(double)
-
operator_plus
@Pure public Matrix2d operator_plus(Matrix2d matrix)
Replies the addition of the given matrix to this matrix:this + matrix
.This function is an implementation of the operator for the languages that defined or based on the Xtext framework.
- Parameters:
matrix
- the matrix.- Returns:
- the sum of the matrices.
- See Also:
add(Matrix2d)
-
operator_plus
@Pure public Matrix2d operator_plus(double scalar)
Replies the addition of the given scalar to this matrix:this + scalar
.This function is an implementation of the operator for the languages that defined or based on the Xtext framework.
The operation
scalar + this
is supported byMatrixExtensions.operator_plus(double, Matrix2d)
.- Parameters:
scalar
- the scalar.- Returns:
- the sum of the matrix and the scalar.
- See Also:
add(double)
,MatrixExtensions.operator_plus(double, Matrix2d)
-
operator_minus
@Pure public Matrix2d operator_minus(Matrix2d matrix)
Replies the substraction of the given matrix to this matrix:this + matrix
.This function is an implementation of the operator for the languages that defined or based on the Xtext framework.
- Parameters:
matrix
- the matrix.- Returns:
- the result of the substraction.
- See Also:
sub(Matrix2d)
-
operator_minus
@Pure public Matrix2d operator_minus(double scalar)
Replies the substraction of the given scalar to this matrix:this - scalar
.This function is an implementation of the operator for the languages that defined or based on the Xtext framework.
The operation
scalar - this
is supported byMatrixExtensions.operator_minus(double, Matrix2d)
.- Parameters:
scalar
- the scalar.- Returns:
- the result of the substraction.
- See Also:
add(double)
,MatrixExtensions.operator_minus(double, Matrix2d)
-
operator_minus
@Pure public Matrix2d operator_minus()
Replies the negation of this matrix:-this
.This function is an implementation of the operator for the languages that defined or based on the Xtext framework.
- Returns:
- the negation of this matrix.
- See Also:
negate()
-
operator_multiply
@Pure public Matrix2d operator_multiply(Matrix2d matrix)
Replies the multiplication of the given matrix and this matrix:this * matrix
.This function is an implementation of the operator for the languages that defined or based on the Xtext framework.
- Parameters:
matrix
- the matrix.- Returns:
- the multiplication of the matrices.
- See Also:
mul(Matrix2d)
-
operator_multiply
@Pure public Matrix2d operator_multiply(double scalar)
Replies the multiplication of the given scalar and this matrix:this * scalar
.This function is an implementation of the operator for the languages that defined or based on the Xtext framework.
The operation
scalar * this
is supported byMatrixExtensions.operator_multiply(double, Matrix2d)
.- Parameters:
scalar
- the scalar.- Returns:
- the multiplication of the scalar and the matrix.
- See Also:
mul(Matrix2d)
,MatrixExtensions.operator_multiply(double, Matrix2d)
-
operator_divide
@Pure public Matrix2d operator_divide(double scalar)
Replies the division of this matrix by the given scalar:this / scalar
.This function is an implementation of the operator for the languages that defined or based on the Xtext framework.
The operation
this / scalar
is supported byMatrixExtensions.operator_divide(double, Matrix2d)
.- Parameters:
scalar
- the scalar.- Returns:
- the division of the matrix by the scalar.
- See Also:
mul(double)
,MatrixExtensions.operator_divide(double, Matrix2d)
-
operator_plusPlus
public void operator_plusPlus()
Increment this matrix:this++
.This function is an implementation of the operator for the languages that defined or based on the Xtext framework.
- See Also:
add(double)
-
operator_moinsMoins
public void operator_moinsMoins()
Increment this matrix:this--
.This function is an implementation of the operator for the languages that defined or based on the Xtext framework.
- See Also:
add(double)
-
operator_not
public Matrix2d operator_not()
Replies the transposition of this matrix:!this
.This function is an implementation of the operator for the languages that defined or based on the Xtext framework.
- Returns:
- the transpose
- See Also:
add(double)
-
$plus
@Pure public Matrix2d $plus(Matrix2d matrix)
Replies the addition of the given matrix to this matrix:this + matrix
.This function is an implementation of the operator for the Scala Language.
- Parameters:
matrix
- the matrix.- Returns:
- the sum of the matrices.
- See Also:
add(Matrix2d)
-
$plus
@Pure public Matrix2d $plus(double scalar)
Replies the addition of the given scalar to this matrix:this + scalar
.This function is an implementation of the operator for the Scala Language.
The operation
scalar + this
is supported byMatrixExtensions.$plus(double, Matrix2d)
.- Parameters:
scalar
- the scalar.- Returns:
- the sum of the matrix and the scalar.
- See Also:
add(double)
,MatrixExtensions.$plus(double, Matrix2d)
-
$minus
@Pure public Matrix2d $minus(Matrix2d matrix)
Replies the substraction of the given matrix to this matrix:this + matrix
.This function is an implementation of the operator for the Scala Language.
- Parameters:
matrix
- the matrix.- Returns:
- the result of the substraction.
- See Also:
sub(Matrix2d)
-
$minus
@Pure public Matrix2d $minus(double scalar)
Replies the substraction of the given scalar to this matrix:this - scalar
.This function is an implementation of the operator for the Scala Language.
The operation
scalar - this
is supported byMatrixExtensions.$minus(double, Matrix2d)
.- Parameters:
scalar
- the scalar.- Returns:
- the result of the substraction.
- See Also:
add(double)
,MatrixExtensions.$minus(double, Matrix2d)
-
$minus
@Pure public Matrix2d $minus()
Replies the negation of this matrix:-this
.This function is an implementation of the operator for the Scala Language.
- Returns:
- the negation of this matrix.
- See Also:
negate()
-
$times
@Pure public Matrix2d $times(Matrix2d matrix)
Replies the multiplication of the given matrix and this matrix:this * matrix
.This function is an implementation of the operator for the Scala Language.
- Parameters:
matrix
- the matrix.- Returns:
- the multiplication of the matrices.
- See Also:
mul(Matrix2d)
-
$times
@Pure public Matrix2d $times(double scalar)
Replies the multiplication of the given scalar and this matrix:this * scalar
.This function is an implementation of the operator for the Scala Language.
The operation
scalar * this
is supported byMatrixExtensions.$times(double, Matrix2d)
.- Parameters:
scalar
- the scalar.- Returns:
- the multiplication of the scalar and the matrix.
- See Also:
mul(Matrix2d)
,MatrixExtensions.$times(double, Matrix2d)
-
$div
@Pure public Matrix2d $div(double scalar)
Replies the division of this matrix by the given scalar:this / scalar
.This function is an implementation of the operator for the Scala Language.
The operation
this / scalar
is supported byMatrixExtensions.$div(double, Matrix2d)
.- Parameters:
scalar
- the scalar.- Returns:
- the division of the matrix by the scalar.
- See Also:
mul(double)
,MatrixExtensions.$div(double, Matrix2d)
-
$bang
public Matrix2d $bang()
Replies the transposition of this matrix:!this
.This function is an implementation of the operator for the Scala Language.
- Returns:
- the transpose
- See Also:
add(double)
-
-