public Vector minus(Vector vector) {
    int size = vector.getSize();
    if (size != getSize()) throw new IllegalArgumentException("sizes mismatch");
    double[] result = toArray();
    for (int i = 0; i < result.length; i++) result[i] -= vector.get(i);
    return new Vector(result);
  }
public Vector minus(Vector vector)