@Test public void testInverse() throws Exception { DenseMatrix matA = DenseMatrix.rand(5, 5); DenseMatrix matIA = matA.inverse(); DenseMatrix matAIA = matA.multiplies(matIA); DenseMatrix matI = DenseMatrix.eye(5); assertEqual2D(matAIA.getArrayCopy2D(), matI.getArrayCopy2D()); }
public DenseMatrix inverse() { return BreezeUtils.inverse(this); }
DenseMatrix implements Serializable { public DenseMatrix inverse() { return BreezeUtils.inverse(this); } }
DenseMatrix implements Serializable { public DenseMatrix inverse() { return BreezeUtils.inverse(this); } DenseMatrix();  DenseMatrix(int m, int n);  DenseMatrix(int m, int n, double[] data);  DenseMatrix(int m, int n, double[] data, boolean inRowMajor);  DenseMatrix(double[][] data); }
DenseMatrix implements Serializable { public DenseMatrix inverse() { return BreezeUtils.inverse(this); } DenseMatrix();  DenseMatrix(int m, int n);  DenseMatrix(int m, int n, double[] data);  DenseMatrix(int m, int n, double[] data, boolean inRowMajor);  DenseMatrix(double[][] data); static DenseMatrix eye(int n); static DenseMatrix eye(int m, int n); static DenseMatrix zeros(int m, int n); static DenseMatrix ones(int m, int n); static DenseMatrix rand(int m, int n); static DenseMatrix randSymmetric(int n); double get(int i, int j); double[] getData(); double[][] getArrayCopy2D(); double[] getArrayCopy1D(boolean inRowMajor); double[] getRow(int row); double[] getColumn(int col); @Override DenseMatrix clone(); @Override boolean equals(Object o); DenseMatrix selectRows(int[] rows); DenseMatrix getSubMatrix(int m0, int m1, int n0, int n1); void setSubMatrix(DenseMatrix sub, int m0, int m1, int n0, int n1); void set(int i, int j, double s); void add(int i, int j, double s); boolean isSquare(); boolean isSymmetric(); int numRows(); int numCols(); double sum(); DenseMatrix scale(double v); void scaleEqual(double v); DenseMatrix plus(DenseMatrix mat); DenseMatrix plus(double alpha); void plusEquals(DenseMatrix mat); void plusEquals(double alpha); DenseMatrix minus(DenseMatrix mat); void minusEquals(DenseMatrix mat); DenseMatrix multiplies(DenseMatrix mat); DenseVector multiplies(DenseVector x); DenseVector multiplies(SparseVector x); DenseMatrix transpose(); @Override String toString(); double norm2(); double cond(); double det(); int rank(); DenseMatrix solve(DenseMatrix matB); DenseVector solve(DenseVector b); DenseMatrix solveLS(DenseMatrix matB); DenseVector solveLS(DenseVector b); DenseMatrix inverse(); }
DenseMatrix implements Serializable { public DenseMatrix inverse() { return BreezeUtils.inverse(this); } DenseMatrix();  DenseMatrix(int m, int n);  DenseMatrix(int m, int n, double[] data);  DenseMatrix(int m, int n, double[] data, boolean inRowMajor);  DenseMatrix(double[][] data); static DenseMatrix eye(int n); static DenseMatrix eye(int m, int n); static DenseMatrix zeros(int m, int n); static DenseMatrix ones(int m, int n); static DenseMatrix rand(int m, int n); static DenseMatrix randSymmetric(int n); double get(int i, int j); double[] getData(); double[][] getArrayCopy2D(); double[] getArrayCopy1D(boolean inRowMajor); double[] getRow(int row); double[] getColumn(int col); @Override DenseMatrix clone(); @Override boolean equals(Object o); DenseMatrix selectRows(int[] rows); DenseMatrix getSubMatrix(int m0, int m1, int n0, int n1); void setSubMatrix(DenseMatrix sub, int m0, int m1, int n0, int n1); void set(int i, int j, double s); void add(int i, int j, double s); boolean isSquare(); boolean isSymmetric(); int numRows(); int numCols(); double sum(); DenseMatrix scale(double v); void scaleEqual(double v); DenseMatrix plus(DenseMatrix mat); DenseMatrix plus(double alpha); void plusEquals(DenseMatrix mat); void plusEquals(double alpha); DenseMatrix minus(DenseMatrix mat); void minusEquals(DenseMatrix mat); DenseMatrix multiplies(DenseMatrix mat); DenseVector multiplies(DenseVector x); DenseVector multiplies(SparseVector x); DenseMatrix transpose(); @Override String toString(); double norm2(); double cond(); double det(); int rank(); DenseMatrix solve(DenseMatrix matB); DenseVector solve(DenseVector b); DenseMatrix solveLS(DenseMatrix matB); DenseVector solveLS(DenseVector b); DenseMatrix inverse();  }