// Duplicatation (preferred instead): public void copyTo(vec <T> copy) { copy.clear(); copy.growTo(sz); if (sz > 0) { Array.Copy(data, copy.data, sz); } }
public void setBounds(int size) { Solver.assert(size >= 0); indices.growTo(size, 0); }