@Test public void invertTest() { GeneralMatrix gm = new GeneralMatrix(id4); gm.invert(); GeneralMatrix gm2 = new GeneralMatrix(id4); GeneralMatrix.epsilonEquals(gm, gm2, EPSILON_TOLERANCE); GeneralMatrix gma = new GeneralMatrix(arrayA); gma.invert(); GeneralMatrix gmaInverse = new GeneralMatrix(arrayAInverse); GeneralMatrix.epsilonEquals(gma, gmaInverse, EPSILON_TOLERANCE); gma.invert(); GeneralMatrix gma2 = new GeneralMatrix(arrayA); GeneralMatrix.epsilonEquals(gma, gma2, EPSILON_TOLERANCE); }
@Override public void invert() { boolean success = CommonOps_DDRM.invert(mat); if (!success) { throw new SingularMatrixException("Could not invert, possible singular matrix?"); } }
GeneralMatrix implements XMatrix, Serializable { @Override public void invert() { boolean success = CommonOps_DDRM.invert(mat); if (!success) { throw new SingularMatrixException("Could not invert, possible singular matrix?"); } } }
GeneralMatrix implements XMatrix, Serializable { @Override public void invert() { boolean success = CommonOps_DDRM.invert(mat); if (!success) { throw new SingularMatrixException("Could not invert, possible singular matrix?"); } } GeneralMatrix(final int size);  GeneralMatrix(final int numRow, final int numCol);  GeneralMatrix(final int numRow, final int numCol, final double... matrix);  GeneralMatrix(final int numRow, final int numCol, final Matrix matrix);  GeneralMatrix(final double[][] matrix);  GeneralMatrix(final Matrix matrix);  GeneralMatrix(final GeneralMatrix matrix);  GeneralMatrix(final AffineTransform transform);  GeneralMatrix(final Envelope srcRegion, final Envelope dstRegion);  GeneralMatrix(final AxisDirection[] srcAxis, final AxisDirection[] dstAxis);  GeneralMatrix(
            final Envelope srcRegion,
            final AxisDirection[] srcAxis,
            final Envelope dstRegion,
            final AxisDirection[] dstAxis); private  GeneralMatrix(
            final Envelope srcRegion,
            final AxisDirection[] srcAxis,
            final Envelope dstRegion,
            final AxisDirection[] dstAxis,
            final boolean validRegions); }
GeneralMatrix implements XMatrix, Serializable { @Override public void invert() { boolean success = CommonOps_DDRM.invert(mat); if (!success) { throw new SingularMatrixException("Could not invert, possible singular matrix?"); } } GeneralMatrix(final int size);  GeneralMatrix(final int numRow, final int numCol);  GeneralMatrix(final int numRow, final int numCol, final double... matrix);  GeneralMatrix(final int numRow, final int numCol, final Matrix matrix);  GeneralMatrix(final double[][] matrix);  GeneralMatrix(final Matrix matrix);  GeneralMatrix(final GeneralMatrix matrix);  GeneralMatrix(final AffineTransform transform);  GeneralMatrix(final Envelope srcRegion, final Envelope dstRegion);  GeneralMatrix(final AxisDirection[] srcAxis, final AxisDirection[] dstAxis);  GeneralMatrix(
            final Envelope srcRegion,
            final AxisDirection[] srcAxis,
            final Envelope dstRegion,
            final AxisDirection[] dstAxis); private  GeneralMatrix(
            final Envelope srcRegion,
            final AxisDirection[] srcAxis,
            final Envelope dstRegion,
            final AxisDirection[] dstAxis,
            final boolean validRegions); static double[][] getElements(final Matrix matrix); final double[][] getElements(); final boolean isAffine(); @Override void negate(); @Override void negate(Matrix matrix); @Override void transpose(); @Override void transpose(Matrix matrix); @Override void invert(); @Override void invert(Matrix matrix); @Override int getNumRow(); @Override int getNumCol(); @Override double getElement(int row, int column); void setColumn(int column, double... values); void setRow(int row, double... values); @Override void setElement(int row, int column, double value); @Override void setZero(); @Override void setIdentity(); final boolean isIdentity(); final boolean isIdentity(double tolerance); final void multiply(final Matrix matrix); @Override int hashCode(); @Override boolean equals(Object obj); boolean equals(final Matrix matrix, final double tolerance); final AffineTransform toAffineTransform2D(); static GeneralMatrix load(final File file); static GeneralMatrix load(final BufferedReader in, final Locale locale); @Override String toString(); @Override GeneralMatrix clone(); void copySubMatrix(
            int rowSource,
            int colSource,
            int numRows,
            int numCol,
            int rowDest,
            int colDest,
            GeneralMatrix target); void getColumn(int col, double[] array); @Override void mul(double scalar); @Override void mul(double scalar, Matrix matrix); void getRow(int row, double[] array); final void mul(Matrix matrix); void mul(Matrix matrix1, Matrix matrix2); @Override void sub(double scalar); @Override void sub(double scalar, Matrix matrix); void sub(Matrix matrix); void sub(Matrix matrix1, Matrix matrix2); void set(double[] matrix); void setSize(int numRows, int numCols); @Override void add(double scalar); @Override void add(double scalar, XMatrix matrix); @Override void add(XMatrix matrix); @Override void add(XMatrix matrix1, XMatrix matrix2); @Override double determinate(); }
GeneralMatrix implements XMatrix, Serializable { @Override public void invert() { boolean success = CommonOps_DDRM.invert(mat); if (!success) { throw new SingularMatrixException("Could not invert, possible singular matrix?"); } } GeneralMatrix(final int size);  GeneralMatrix(final int numRow, final int numCol);  GeneralMatrix(final int numRow, final int numCol, final double... matrix);  GeneralMatrix(final int numRow, final int numCol, final Matrix matrix);  GeneralMatrix(final double[][] matrix);  GeneralMatrix(final Matrix matrix);  GeneralMatrix(final GeneralMatrix matrix);  GeneralMatrix(final AffineTransform transform);  GeneralMatrix(final Envelope srcRegion, final Envelope dstRegion);  GeneralMatrix(final AxisDirection[] srcAxis, final AxisDirection[] dstAxis);  GeneralMatrix(
            final Envelope srcRegion,
            final AxisDirection[] srcAxis,
            final Envelope dstRegion,
            final AxisDirection[] dstAxis); private  GeneralMatrix(
            final Envelope srcRegion,
            final AxisDirection[] srcAxis,
            final Envelope dstRegion,
            final AxisDirection[] dstAxis,
            final boolean validRegions); static double[][] getElements(final Matrix matrix); final double[][] getElements(); final boolean isAffine(); @Override void negate(); @Override void negate(Matrix matrix); @Override void transpose(); @Override void transpose(Matrix matrix); @Override void invert(); @Override void invert(Matrix matrix); @Override int getNumRow(); @Override int getNumCol(); @Override double getElement(int row, int column); void setColumn(int column, double... values); void setRow(int row, double... values); @Override void setElement(int row, int column, double value); @Override void setZero(); @Override void setIdentity(); final boolean isIdentity(); final boolean isIdentity(double tolerance); final void multiply(final Matrix matrix); @Override int hashCode(); @Override boolean equals(Object obj); boolean equals(final Matrix matrix, final double tolerance); final AffineTransform toAffineTransform2D(); static GeneralMatrix load(final File file); static GeneralMatrix load(final BufferedReader in, final Locale locale); @Override String toString(); @Override GeneralMatrix clone(); void copySubMatrix(
            int rowSource,
            int colSource,
            int numRows,
            int numCol,
            int rowDest,
            int colDest,
            GeneralMatrix target); void getColumn(int col, double[] array); @Override void mul(double scalar); @Override void mul(double scalar, Matrix matrix); void getRow(int row, double[] array); final void mul(Matrix matrix); void mul(Matrix matrix1, Matrix matrix2); @Override void sub(double scalar); @Override void sub(double scalar, Matrix matrix); void sub(Matrix matrix); void sub(Matrix matrix1, Matrix matrix2); void set(double[] matrix); void setSize(int numRows, int numCols); @Override void add(double scalar); @Override void add(double scalar, XMatrix matrix); @Override void add(XMatrix matrix); @Override void add(XMatrix matrix1, XMatrix matrix2); @Override double determinate();  }