150151152153154155156157158159160
@Override public void unsafeSet(int row, int column, double value) { AVector v=getColumn(column); if (v.isFullyMutable()) { v.unsafeSet(row,value); } else { v=v.mutable(); replaceColumn(column,v); v.unsafeSet(row,value); }
154155156157158159160161162163164
if (v.isFullyMutable()) { v.unsafeSet(row,value); } else { v=v.mutable(); replaceColumn(column,v); v.unsafeSet(row,value); } } @Override public void set(AMatrix a) {
140141142143144145146147148149150
return; } else { v = v.sparseClone(); } unsafeSetVec(i, v); v.unsafeSet(j, value); } @Override public double unsafeGet(int row, int column) { return getRow(row).unsafeGet(column);
152153154155156157158159160161162
@Override public void unsafeSet(int row, int column, double value) { AVector v=getRow(row); if (v.isFullyMutable()) { v.unsafeSet(column,value); } else { v=v.mutable(); replaceRow(row,v); v.unsafeSet(column,value); }
156157158159160161162163164165166
if (v.isFullyMutable()) { v.unsafeSet(column,value); } else { v=v.mutable(); replaceRow(row,v); v.unsafeSet(column,value); } } @Override public void set(AMatrix a) {
10131014101510161017101810191020102110221023
AVector b = getRowView(j); int cc = columnCount(); for (int k = 0; k < cc; k++) { double t = a.unsafeGet(k); a.unsafeSet(k, b.unsafeGet(k)); b.unsafeSet(k, t); } } /** * Swaps two columns of the matrix in place
10291030103110321033103410351036103710381039
AVector b = getColumnView(j); int rc = rowCount(); for (int k = 0; k < rc; k++) { double t = a.unsafeGet(k); a.unsafeSet(k, b.unsafeGet(k)); b.unsafeSet(k, t); } } public void composeWith(AMatrix a) { AMatrix t=compose(a);