Module ojalgo

Interface MatrixDecomposition.Solver<N extends java.lang.Comparable<N>>

    • Method Detail

      • getInverse

        default MatrixStore<N> getInverse()
        The output must be a "right inverse" and a "generalised inverse".
      • getInverse

        MatrixStore<N> getInverse​(PhysicalStore<N> preallocated)

        Implementing this method is optional.

        Exactly how a specific implementation makes use of preallocated is not specified by this interface. It must be documented for each implementation.

        Should produce the same results as calling getInverse().

        Parameters:
        preallocated - Preallocated memory for the results, possibly some intermediate results. You must assume this is modified, but you cannot assume it will contain the full/final/correct solution. Use preallocate(int, int) or InverterTask.preallocate(Structure2D) to get a suitable instance.
        Returns:
        The inverse, this is where you get the solution
        Throws:
        java.lang.UnsupportedOperationException - When/if this feature is not implemented
      • getSolution

        MatrixStore<N> getSolution​(Access2D.Collectable<N,​? super PhysicalStore<N>> rhs,
                                   PhysicalStore<N> preallocated)

        Implementing this method is optional.

        Exactly how a specific implementation makes use of preallocated is not specified by this interface. It must be documented for each implementation.

        Should produce the same results as calling getSolution(Collectable).

        Parameters:
        rhs - The Right Hand Side, wont be modfied
        preallocated - Preallocated memory for the results, possibly some intermediate results. You must assume this is modified, but you cannot assume it will contain the full/final/correct solution. Use SolverTask.preallocate(int, int, int) or SolverTask.preallocate(Structure2D, Structure2D) to get a suitable instance.
        Returns:
        The solution
        Throws:
        java.lang.UnsupportedOperationException - When/if this feature is not implemented
      • isSolvable

        boolean isSolvable()
        Please note that producing a pseudoinverse and/or a least squares solution is ok! The return value, of this method, is not an indication of if the decomposed matrix is square, has full rank, is postive definite or whatever. It's that in combination with the specific decomposition algorithm's capabilities.
        Returns:
        true if this matrix decomposition is in a state to be able to deliver an inverse or an equation system solution (with some degree of numerical stability).