@Override public void set(int rowIndex, int columnIndex, double value) { setElement(rowIndex, columnIndex, value); }
@Override public void set(int rowIndex, int columnIndex, double value) { setElement(rowIndex, columnIndex, value); }
@Override public void set(int rowIndex, int columnIndex, double value) { setElement(rowIndex, columnIndex, value); }
/** * The O(n^3) multiplication algorithm that is here for if BLAS isn't * available, or if the dimensions wouldn't allow 1-d array indexing. * * @param m The right matrix to multiply by this * @return The result of multiplying this times m */ private Matrix slowMult( final DenseMatrix m) { DenseMatrix result = new DenseMatrix(getNumRows(), m.getNumColumns()); for (int i = 0; i < getNumRows(); i++) { for (int j = 0; j < m.getNumColumns(); j++) { double val = 0; for (int k = 0; k < getNumColumns(); k++) { val += get(i, k) * m.get(k, j); } result.setElement(i, j, val); } } return result; }
/** * The O(n^3) multiplication algorithm that is here for if BLAS isn't * available, or if the dimensions wouldn't allow 1-d array indexing. * * @param m The right matrix to multiply by this * @return The result of multiplying this times m */ private Matrix slowMult( final DenseMatrix m) { DenseMatrix result = new DenseMatrix(getNumRows(), m.getNumColumns()); for (int i = 0; i < getNumRows(); i++) { for (int j = 0; j < m.getNumColumns(); j++) { double val = 0; for (int k = 0; k < getNumColumns(); k++) { val += get(i, k) * m.get(k, j); } result.setElement(i, j, val); } } return result; }
/** * The O(n^3) multiplication algorithm that is here for if BLAS isn't * available, or if the dimensions wouldn't allow 1-d array indexing. * * @param m The right matrix to multiply by this * @return The result of multiplying this times m */ private Matrix slowMult( final DenseMatrix m) { DenseMatrix result = new DenseMatrix(getNumRows(), m.getNumColumns()); for (int i = 0; i < getNumRows(); i++) { for (int j = 0; j < m.getNumColumns(); j++) { double val = 0; for (int k = 0; k < getNumColumns(); k++) { val += get(i, k) * m.get(k, j); } result.setElement(i, j, val); } } return result; }