public void run() { int idx = firstRow * columns; for (int r = firstRow; r < lastRow; r++) { for (int c = 0; c < columns; c++) { setQuick(r, c, values[idx++]); } } } });
public void run() { for (int r = firstRow; r < lastRow; r++) { for (int c = 0; c < columns; c++) { setQuick(r, c, value); } } } });
public void run() { for (int r = firstRow; r < lastRow; r++) { for (int c = 0; c < columns; c++) { setQuick(r, c, value); } } } });
public void run() { int idx = firstRow * columns; for (int r = firstRow; r < lastRow; r++) { for (int c = 0; c < columns; c++) { setQuick(r, c, values[idx++]); } } } });
public void run() { for (int r = firstRow; r < lastRow; r++) { for (int c = 0; c < columns; c++) { Im.setQuick(r, c, getQuick(r, c)[1]); } } } });
public void run() { for (int r = firstRow; r < lastRow; r++) { for (int c = 0; c < columns; c++) { Re.setQuick(r, c, getQuick(r, c)[0]); } } } });
public void run() { for (int r = firstRow; r < lastRow; r++) { for (int c = 0; c < columns; c++) { setQuick(r, c, source.getQuick(r, c)); } } } });
public void run() { for (int r = firstRow; r < lastRow; r++) { for (int c = 0; c < columns; c++) { setQuick(r, c, source.getQuick(r, c)); } } } });
/** * Constructs an identity matrix (having ones on the diagonal and zeros * elsewhere). */ public DoubleMatrix2D identity(int rowsAndColumns) { DoubleMatrix2D matrix = make(rowsAndColumns, rowsAndColumns); for (int i = rowsAndColumns; --i >= 0;) { matrix.setQuick(i, i, 1); } return matrix; }
public void run() { for (int r = firstRow; r < lastRow; r++) { for (int c = 0; c < columns; c++) { setQuick(r, c, f.apply(getQuick(r, c))); } } } });
public void run() { double elem; for (int r = firstRow; r < lastRow; r++) { for (int c = 0; c < columns; c++) { elem = getQuick(r, c); if (cond.apply(elem) == true) { setQuick(r, c, value); } } } } });
public void run() { for (int r = firstRow; r < lastRow; r++) { for (int c = 0; c < columns; c++) { setQuick(r, c, f.apply(getQuick(r, c))); } } } });
private static DoubleMatrix2D resizeTrafficMatrix(DoubleMatrix2D trafficMatrix, int N) { int oldN = trafficMatrix.rows(); int minN = Math.min(oldN, N); DoubleMatrix2D newTrafficMatrix = DoubleFactory2D.dense.make(N, N); for (int ingressNodeId = 0; ingressNodeId < minN; ingressNodeId++) for (int egressNodeId = ingressNodeId + 1; egressNodeId < minN; egressNodeId++) newTrafficMatrix.setQuick(ingressNodeId, egressNodeId, trafficMatrix.getQuick(ingressNodeId, egressNodeId)); return newTrafficMatrix; }
public void run() { double elem; for (int r = firstRow; r < lastRow; r++) { for (int c = 0; c < columns; c++) { elem = getQuick(r, c); if (cond.apply(elem) == true) { setQuick(r, c, f.apply(elem)); } } } } });
public void run() { double elem; for (int r = firstRow; r < lastRow; r++) { for (int c = 0; c < columns; c++) { elem = getQuick(r, c); if (cond.apply(elem) == true) { setQuick(r, c, f.apply(elem)); } } } } });
public void run() { for (int r = firstRow; r < lastRow; r++) { for (int c = 0; c < columns; c++) { setQuick(r, c, function.apply(getQuick(r, c), y.getQuick(r, c))); } } }
public void run() { for (int a = firstIdx; a < lastIdx; a++) { for (int b = 0; b < m; b++) { double s = 0; for (int c = 0; c < n; c++) { s += getQuick(b, c) * B.getQuick(c, a); } CC.setQuick(b, a, alpha * s + beta * CC.getQuick(b, a)); } } } });
public void run() { for (int r = firstRow; r < lastRow; r++) { for (int c = 0; c < columns; c++) { setQuick(r, c, function.apply(getQuick(r, c), y.getQuick(r, c))); } } }
public void run() { for (int a = firstIdx; a < lastIdx; a++) { for (int b = 0; b < m; b++) { double s = 0; for (int c = 0; c < n; c++) { s += getQuick(b, c) * B.getQuick(c, a); } CC.setQuick(b, a, alpha * s + beta * CC.getQuick(b, a)); } } } });
public void run() { for (int i = firstIdx; i < lastIdx; i++) { setQuick(rowElements[i], columnElements[i], function.apply(getQuick(rowElements[i], columnElements[i]), y.getQuick(rowElements[i], columnElements[i]))); } }