public Vec sortedCopy(){
  double[] arrayCopy=arrayCopy();
  Arrays.sort(arrayCopy);
  return new DenseVector(arrayCopy);
}

public Vec sortedCopy ( ) { double [ ] arrayCopy = arrayCopy ( ) ; Arrays . sort ( arrayCopy ) ; return new DenseVector ( arrayCopy ) ; }
returns a copy of this array with the values moved around so that they are in sorted order
