Package PamUtils

Class MatrixOps

java.lang.Object
PamUtils.MatrixOps

public class MatrixOps extends Object
  • Constructor Details

    • MatrixOps

      public MatrixOps()
  • Method Details

    • checkRectangular

      public static boolean checkRectangular(Complex[][] a)
      Check the array is rectangular, => all sub arrays are same length.
      Parameters:
      a - A 2D Complex Array
      Returns:
      false if null,

      true if 0-length or is rectangular

    • complexMatrixCross

      public static Complex[][] complexMatrixCross(Complex[][] a, Complex[][] b)
    • transposeMatrix

      public static Complex[][] transposeMatrix(Complex[][] a)
    • scalarMultMatrix

      public static Complex[][] scalarMultMatrix(Complex[][] a, Complex scalar)
    • printMatrix

      public static void printMatrix(Complex[][] a)
      debug tool
      print a complex matrix (with no null entries) to std out
      Parameters:
      a -
    • getRealMatrix

      public static double[][] getRealMatrix(Complex[][] a)
      Parameters:
      a - Complex 2D array
      Returns:
      the real parts in a double 2d array
    • det33Matrix

      public static Complex det33Matrix(Complex[][] A)
      Returns:
      determinant
    • detNnMatrix

      public static Complex detNnMatrix(Complex[][] A)
    • inverse33Matrix

      public static Complex[][] inverse33Matrix(Complex[][] A)
    • inverseNnMatrix

      public static Complex[][] inverseNnMatrix(Complex[][] A)
    • recipComp

      public static Complex recipComp(Complex z)
    • getAbsMatrix

      public static double[][] getAbsMatrix(double[][] matrix)
      Make a new matrix with abs values of the original.
      Parameters:
      matrix -
      Returns:
    • createImage

      public static BufferedImage createImage(double[][] surfaceData, ColourArray colorArray, boolean logScale, double intensityScaleFactor)
    • checkRectangular

      public static boolean checkRectangular(double[][] a)
    • applyMask

      public static boolean applyMask(Complex[] ary, double[] windowFunction)
    • applyMask

      public static boolean applyMask(double[] ary, double[] windowFunction)