public final Double getObject(long row, long column) { return getDouble(row, column); }
public Matrix selectRows(Ret returnType, long... rows) { if (returnType == Ret.LINK && rows.length == 1) { return getRow(rows[0]); } else { return super.selectRows(returnType, rows); } }
public final void setObject(Double o, long row, long column) { setDouble(o, row, column); }
public Matrix solveSPD(Matrix b) { if (b instanceof ColtDenseDoubleMatrix2D) { ColtDenseDoubleMatrix2D b2 = (ColtDenseDoubleMatrix2D) b; DoubleMatrix2D ret = new CholeskyDecomposition(matrix).solve(b2.getWrappedObject()); return new ColtDenseDoubleMatrix2D(ret); } else { return super.solve(b); } }
public Matrix mtimes(Matrix m) { if (m instanceof ColtSparseDoubleMatrix2D) { SparseDoubleMatrix2D ret = new SparseDoubleMatrix2D((int) getRowCount(), (int) m.getColumnCount()); matrix.zMult(((ColtSparseDoubleMatrix2D) m).matrix, ret); return new ColtSparseDoubleMatrix2D(ret); } else { return super.mtimes(m); } }
public Matrix solveSPD(Matrix b) { if (b instanceof ColtDenseDoubleMatrix2D) { ColtDenseDoubleMatrix2D b2 = (ColtDenseDoubleMatrix2D) b; DoubleMatrix2D ret = new CholeskyDecomposition(matrix).solve(b2.getWrappedObject()); return new ColtDenseDoubleMatrix2D(ret); } else { return super.solve(b); } }
public Matrix mtimes(Matrix m) { if (m instanceof ColtSparseDoubleMatrix2D) { SparseDoubleMatrix2D ret = new SparseDoubleMatrix2D((int) getRowCount(), (int) m.getColumnCount()); matrix.zMult(((ColtSparseDoubleMatrix2D) m).matrix, ret); return new ColtSparseDoubleMatrix2D(ret); } else { return super.mtimes(m); } }
public Matrix solve(Matrix b) { if (b instanceof ColtDenseDoubleMatrix2D) { ColtDenseDoubleMatrix2D b2 = (ColtDenseDoubleMatrix2D) b; if (isSquare()) { DoubleMatrix2D ret = new LUDecomposition(matrix).solve(b2.getWrappedObject()); return new ColtDenseDoubleMatrix2D(ret); } else { DoubleMatrix2D ret = new QRDecomposition(matrix).solve(b2.getWrappedObject()); return new ColtDenseDoubleMatrix2D(ret); } } else { return super.solve(b); } }
public final void setObject(Double o, int row, int column) { setDouble(o, row, column); }
public final Double getObject(int row, int column) { return getDouble(row, column); }
public Matrix solve(Matrix b) { if (b instanceof ColtDenseDoubleMatrix2D) { ColtDenseDoubleMatrix2D b2 = (ColtDenseDoubleMatrix2D) b; if (isSquare()) { DoubleMatrix2D ret = new LUDecomposition(matrix).solve(b2.getWrappedObject()); return new ColtDenseDoubleMatrix2D(ret); } else { DoubleMatrix2D ret = new QRDecomposition(matrix).solve(b2.getWrappedObject()); return new ColtDenseDoubleMatrix2D(ret); } } else { return super.solve(b); } }