Class Matrix2x2
java.lang.Object
edu.ntnu.stud.chaosgame.model.data.Matrix2x2
Class representing a 2x2 matrix.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMatrix2x2
(double a00, double a01, double a10, double a11) Create a new 2x2 matrix. -
Method Summary
Modifier and TypeMethodDescriptiondouble
getA00()
Getter method for the a00 component of the matrix.double
getA01()
Getter method for the a01 component of the matrix.double
getA10()
Getter method for the a10 component of the matrix.double
getA11()
Getter method for the a11 component of the matrix.Multiply the matrix by a vector., i.e.
-
Field Details
-
a00
private final double a00The a00 component of the matrix. -
a01
private final double a01The a01 component of the matrix. -
a10
private final double a10The a10 component of the matrix. -
a11
private final double a11The a11 component of the matrix.
-
-
Constructor Details
-
Matrix2x2
public Matrix2x2(double a00, double a01, double a10, double a11) Create a new 2x2 matrix.- Parameters:
a00
- The a00 component of the matrix.a01
- The a01 component of the matrix.a10
- The a10 component of the matrix.a11
- The a11 component of the matrix.
-
-
Method Details
-
multiply
Multiply the matrix by a vector., i.e. compute the product of the matrix and the vector.- Parameters:
v
- The vector to multiply the matrix with.- Returns:
- The a00 component of the matrix.
-
getA00
public double getA00()Getter method for the a00 component of the matrix.- Returns:
- a matrix component.
-
getA01
public double getA01()Getter method for the a01 component of the matrix.- Returns:
- a matrix component.
-
getA10
public double getA10()Getter method for the a10 component of the matrix.- Returns:
- a matrix component.
-
getA11
public double getA11()Getter method for the a11 component of the matrix.- Returns:
- a matrix component.
-