public Matrix solve(Matrix b) { if (b instanceof JamaDenseDoubleMatrix2D) { JamaDenseDoubleMatrix2D b2 = (JamaDenseDoubleMatrix2D) b; Jama.Matrix x = matrix.solve(b2.matrix); return new JamaDenseDoubleMatrix2D(x); } else { return super.solve(b); } }
public Matrix solve(Matrix b) { if (b instanceof JamaDenseDoubleMatrix2D) { JamaDenseDoubleMatrix2D b2 = (JamaDenseDoubleMatrix2D) b; Jama.Matrix x = matrix.solve(b2.matrix); return new JamaDenseDoubleMatrix2D(x); } else { return super.solve(b); } }
public Matrix solve(Matrix b) { if (b instanceof JScienceDenseDoubleMatrix2D) { JScienceDenseDoubleMatrix2D b2 = (JScienceDenseDoubleMatrix2D) b; Float64Matrix x = Float64Matrix.valueOf(matrix.solve(b2.matrix)); return new JScienceDenseDoubleMatrix2D(x); } else { return super.solve(b); } }
public Matrix solveSPD(Matrix b) { try { if (b instanceof AbstractCommonsMathDenseDoubleMatrix2D) { AbstractCommonsMathDenseDoubleMatrix2D b2 = (AbstractCommonsMathDenseDoubleMatrix2D) b; RealMatrix ret = new CholeskyDecomposition(matrix).getSolver().solve(b2.matrix); return CommonsMathDenseDoubleMatrix2DFactory.INSTANCE.dense(ret); } else { return super.solve(b); } } catch (Exception e) { throw new RuntimeException(e); } } }
public Matrix solveSPD(Matrix b) { if (b instanceof ParallelColtDenseDoubleMatrix2D) { ParallelColtDenseDoubleMatrix2D b2 = new ParallelColtDenseDoubleMatrix2D(b); DenseDoubleCholeskyDecomposition chol = new DenseDoubleCholeskyDecomposition(matrix); chol.solve(b2.matrix); return b2; } else { return super.solve(b); } }
public Matrix solveSPD(Matrix b) { if (b instanceof ParallelColtDenseDoubleMatrix2D) { ParallelColtDenseDoubleMatrix2D b2 = new ParallelColtDenseDoubleMatrix2D(b); DenseDoubleCholeskyDecomposition chol = new DenseDoubleCholeskyDecomposition(matrix); chol.solve(b2.matrix); return b2; } else { return super.solve(b); } }
public Matrix solve(Matrix b) { if (b instanceof JScienceDenseDoubleMatrix2D) { JScienceDenseDoubleMatrix2D b2 = (JScienceDenseDoubleMatrix2D) b; Float64Matrix x = Float64Matrix.valueOf(matrix.solve(b2.matrix)); return new JScienceDenseDoubleMatrix2D(x); } else { return super.solve(b); } }
public Matrix solveSPD(Matrix b) { if (b instanceof JamaDenseDoubleMatrix2D) { JamaDenseDoubleMatrix2D b2 = (JamaDenseDoubleMatrix2D) b; CholeskyDecomposition chol = new CholeskyDecomposition(matrix); return new JamaDenseDoubleMatrix2D(chol.solve(b2.matrix)); } else { return super.solve(b); } }
public Matrix solveSPD(Matrix b) { if (b instanceof ColtDenseDoubleMatrix2D) { ColtDenseDoubleMatrix2D b2 = (ColtDenseDoubleMatrix2D) b; DoubleMatrix2D ret = new CholeskyDecomposition(matrix).solve(b2.matrix); return new ColtDenseDoubleMatrix2D(ret); } else { return super.solve(b); } }
public Matrix solveSPD(Matrix b) { if (b instanceof JamaDenseDoubleMatrix2D) { JamaDenseDoubleMatrix2D b2 = (JamaDenseDoubleMatrix2D) b; CholeskyDecomposition chol = new CholeskyDecomposition(matrix); return new JamaDenseDoubleMatrix2D(chol.solve(b2.matrix)); } else { return super.solve(b); } }
public Matrix solveSPD(Matrix b) { if (b instanceof ColtDenseDoubleMatrix2D) { ColtDenseDoubleMatrix2D b2 = (ColtDenseDoubleMatrix2D) b; DoubleMatrix2D ret = new CholeskyDecomposition(matrix).solve(b2.matrix); return new ColtDenseDoubleMatrix2D(ret); } else { return super.solve(b); } }
public Matrix solveSPD(Matrix b) { try { if (b instanceof AbstractCommonsMathDenseDoubleMatrix2D) { AbstractCommonsMathDenseDoubleMatrix2D b2 = (AbstractCommonsMathDenseDoubleMatrix2D) b; RealMatrix ret = new CholeskyDecomposition(matrix).getSolver().solve(b2.matrix); return CommonsMathDenseDoubleMatrix2DFactory.INSTANCE.dense(ret); } else { return super.solve(b); } } catch (Exception e) { throw new RuntimeException(e); } } }
public Matrix solve(Matrix b) { if (b instanceof MTJDenseDoubleMatrix2D) { MTJDenseDoubleMatrix2D b2 = (MTJDenseDoubleMatrix2D) b; DenseMatrix x = new DenseMatrix((int) getColumnCount(), (int) b2.getColumnCount()); matrix.solve(b2.matrix, x); return new MTJDenseDoubleMatrix2D(x); } else { return super.solve(b); } }
public Matrix solve(Matrix b) { if (b instanceof MTJDenseDoubleMatrix2D) { MTJDenseDoubleMatrix2D b2 = (MTJDenseDoubleMatrix2D) b; DenseMatrix x = new DenseMatrix((int) getColumnCount(), (int) b2.getColumnCount()); matrix.solve(b2.matrix, x); return new MTJDenseDoubleMatrix2D(x); } else { return super.solve(b); } }
public Matrix solve(Matrix b) { if (b instanceof ColtDenseDoubleMatrix2D) { ColtDenseDoubleMatrix2D b2 = (ColtDenseDoubleMatrix2D) b; if (isSquare()) { DoubleMatrix2D ret = new LUDecomposition(matrix).solve(b2.matrix); return new ColtDenseDoubleMatrix2D(ret); } else { DoubleMatrix2D ret = new QRDecomposition(matrix).solve(b2.matrix); return new ColtDenseDoubleMatrix2D(ret); } } else { return super.solve(b); } }
public Matrix solve(Matrix b) { if (b instanceof ColtDenseDoubleMatrix2D) { ColtDenseDoubleMatrix2D b2 = (ColtDenseDoubleMatrix2D) b; if (isSquare()) { DoubleMatrix2D ret = new LUDecomposition(matrix).solve(b2.matrix); return new ColtDenseDoubleMatrix2D(ret); } else { DoubleMatrix2D ret = new QRDecomposition(matrix).solve(b2.matrix); return new ColtDenseDoubleMatrix2D(ret); } } else { return super.solve(b); } }
public Matrix solve(Matrix b) { if (b instanceof AbstractCommonsMathDenseDoubleMatrix2D) { AbstractCommonsMathDenseDoubleMatrix2D b2 = (AbstractCommonsMathDenseDoubleMatrix2D) b; if (isSquare()) { RealMatrix ret = new LUDecomposition(matrix).getSolver().solve(b2.matrix); return CommonsMathDenseDoubleMatrix2DFactory.INSTANCE.dense(ret); } else { RealMatrix ret = new QRDecomposition(matrix).getSolver().solve(b2.matrix); return CommonsMathDenseDoubleMatrix2DFactory.INSTANCE.dense(ret); } } else { return super.solve(b); } }
public Matrix solve(Matrix b) { if (b instanceof AbstractCommonsMathDenseDoubleMatrix2D) { AbstractCommonsMathDenseDoubleMatrix2D b2 = (AbstractCommonsMathDenseDoubleMatrix2D) b; if (isSquare()) { RealMatrix ret = new LUDecomposition(matrix).getSolver().solve(b2.matrix); return CommonsMathDenseDoubleMatrix2DFactory.INSTANCE.dense(ret); } else { RealMatrix ret = new QRDecomposition(matrix).getSolver().solve(b2.matrix); return CommonsMathDenseDoubleMatrix2DFactory.INSTANCE.dense(ret); } } else { return super.solve(b); } }