Interface MatrixFieldI

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Object cross​(java.lang.Object l, java.lang.Object r)
      The cross product of two vectors
      java.lang.Object det​(java.lang.Object mat)
      The determinant of a matrix
      java.lang.Object dot​(java.lang.Object l, java.lang.Object r)
      The dot product of two vectors
      java.lang.Object inv​(java.lang.Object mat)
      Returns the inverse of a square matrix.
      java.lang.Object solve​(java.lang.Object A, java.lang.Object B)
      Solve equation A * X = B
      java.lang.Object trace​(java.lang.Object mat)
      Returns the trace of a matrix.
      java.lang.Object trans​(java.lang.Object mat)
      Transpose of a matrix
    • Method Detail

      • det

        java.lang.Object det​(java.lang.Object mat)
                      throws EvaluationException
        The determinant of a matrix
        Parameters:
        mat -
        Returns:
        the determinant of mat if it is a matrix
        Throws:
        EvaluationException
      • trans

        java.lang.Object trans​(java.lang.Object mat)
                        throws EvaluationException
        Transpose of a matrix
        Parameters:
        mat - the matrix
        Returns:
        a matrix containing the transpose
        Throws:
        EvaluationException
      • dot

        java.lang.Object dot​(java.lang.Object l,
                             java.lang.Object r)
                      throws EvaluationException
        The dot product of two vectors
        Parameters:
        l -
        r -
        Returns:
        the dot product if both arguments are vectors, null otherwise.
        Throws:
        EvaluationException
      • cross

        java.lang.Object cross​(java.lang.Object l,
                               java.lang.Object r)
                        throws EvaluationException
        The cross product of two vectors
        Parameters:
        l -
        r -
        Returns:
        a vector with the cross product
        Throws:
        EvaluationException - if either vectors not of length 3
      • trace

        java.lang.Object trace​(java.lang.Object mat)
                        throws EvaluationException
        Returns the trace of a matrix.
        Parameters:
        mat - the matrix
        Returns:
        the trace
        Throws:
        EvaluationException
      • inv

        java.lang.Object inv​(java.lang.Object mat)
                      throws EvaluationException
        Returns the inverse of a square matrix.
        Parameters:
        mat - the matrix
        Returns:
        the trace
        Throws:
        EvaluationException - if matrix is not square or is singular
      • solve

        java.lang.Object solve​(java.lang.Object A,
                               java.lang.Object B)
                        throws EvaluationException
        Solve equation A * X = B
        Parameters:
        A - a square matrix
        B - either a vector or matrix with same number of rows as A
        Returns:
        a vector or matrix solving equations
        Throws:
        EvaluationException - if matrix is not square or is singular