code: func (ds *distanceSet) Set(index int, distance float64) bool {
  	if d, ok := ds.Distances[index]; ok && index == ds.MinIndex && distance > d {
  		// minimum index is being made greater, need to reset
  		ds.Distances[index] = distance
  		ds.reset()
  		return true
  	}
  
  	ds.Distances[index] = distance
  	if distance < ds.MinDistance {
  		ds.MinDistance = distance
  		ds.MinIndex = index
  		return true
  	}
  
  	return false
  }
docs: // Set sets the distance for a given index
  // and updates the denormalized min distance if necessary.
  // Returns true if the minimum has been updated.