Class Matrix2x2

java.lang.Object
edu.ntnu.stud.chaosgame.model.data.Matrix2x2

public class Matrix2x2 extends Object
Class representing a 2x2 matrix.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final double
    The a00 component of the matrix.
    private final double
    The a01 component of the matrix.
    private final double
    The a10 component of the matrix.
    private final double
    The a11 component of the matrix.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Matrix2x2(double a00, double a01, double a10, double a11)
    Create a new 2x2 matrix.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Getter method for the a00 component of the matrix.
    double
    Getter method for the a01 component of the matrix.
    double
    Getter method for the a10 component of the matrix.
    double
    Getter method for the a11 component of the matrix.
    Multiply the matrix by a vector., i.e.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • a00

      private final double a00
      The a00 component of the matrix.
    • a01

      private final double a01
      The a01 component of the matrix.
    • a10

      private final double a10
      The a10 component of the matrix.
    • a11

      private final double a11
      The 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

      public Vector2D multiply(Vector2D v)
      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.