clone method

SparseVector clone()

Creates a deep copy of the SparseVector, mutations to the original will not affect the copy.

Implementation

SparseVector clone() {
  return SparseVector.fromBinary(toBinary());
}