Class Matrix

java.lang.Object
mathvoyage.matrix.Matrix

public class Matrix extends Object
voyager.Matrix class
  • Constructor Details

    • Matrix

      public Matrix(double[][] data)
      Instantiates a new Matrix.
      Parameters:
      data - the data
    • Matrix

      public Matrix(int[][] data)
      Instantiates a new Matrix.
      Parameters:
      data - the data
    • Matrix

      public Matrix(int rows, int cols)
      Instantiates a new Matrix.
      Parameters:
      rows - the rows
      cols - the cols
    • Matrix

      public Matrix(double[] data, int rows, int cols)
      Instantiates a new Matrix.
      Parameters:
      data - the data
      rows - the rows
      cols - the cols
    • Matrix

      public Matrix(int[] data, int rows, int cols)
      Instantiates a new Matrix.
      Parameters:
      data - the data
      rows - the rows
      cols - the cols
    • Matrix

      public Matrix(int rows, int cols, double value)
      Instantiates a new Matrix.
      Parameters:
      rows - the rows
      cols - the cols
      value - the value
  • Method Details

    • getDeterminant

      public double getDeterminant()
      Get determinant double.
      Returns:
      the double
    • getRows

      public int getRows()
      Get rows int.
      Returns:
      the int
    • getCols

      public int getCols()
      Get cols int.
      Returns:
      the int
    • getData

      public double[][] getData()
      Get data double [ ] [ ].
      Returns:
      the double [ ] [ ]
    • get

      public double get(int row, int col)
      Get double.
      Parameters:
      row - the row
      col - the col
      Returns:
      the double
    • add

      public Matrix add(Matrix b)
      Add matrix.
      Parameters:
      b - the b
      Returns:
      the matrix
    • subtract

      public Matrix subtract(Matrix b)
      Subtract matrix.
      Parameters:
      b - the b
      Returns:
      the matrix
    • multiply

      public Matrix multiply(Matrix b)
      Multiply matrix.
      Parameters:
      b - the b
      Returns:
      the matrix
    • multiply

      public Matrix multiply(double b)
      Multiply matrix.
      Parameters:
      b - the b
      Returns:
      the matrix
    • transpose

      public Matrix transpose()
      Transpose matrix.
      Returns:
      the matrix
    • inverse

      public Matrix inverse()
      Inverse matrix.
      Returns:
      the matrix
    • printMatrix

      public void printMatrix()
      Print matrix.
    • pow

      public Matrix pow(int exponant)
      Pow matrix.
      Parameters:
      exponant - the exponant
      Returns:
      the matrix
    • isEqual

      public boolean isEqual(Matrix a)
      Is equal boolean.
      Parameters:
      a - the a
      Returns:
      the boolean