464465466467468469470471472473474
public Vector toVector() { Vector v=Vector.createLength(length); double[] data=this.data; int[] ixs=index.data; for (int i=0; i<data.length; i++) { v.unsafeSet(ixs[i],data[i]); } return v; } @Override
224225226227228229230231232233234
@Override public AVector innerProduct(AVector v) { int rc=rowCount(); Vector r=Vector.createLength(rc); for (int i=0; i<rc; i++) { r.unsafeSet(i, getRow(i).dotProduct(v)); } return r; } @Override