code: func (s *state) MinDistance() (a, b int, dist float64) {
  	dist = math.MaxFloat64
  
  	for i, ds := range s.Distances {
  		if ds == nil {
  			continue
  		}
  
  		if ds.MinDistance < dist {
  			dist = ds.MinDistance
  
  			a = i
  			b = ds.MinIndex
  		}
  	}
  
  	return
  }
docs: // MinDistance returns the link with minimum distance.
  // a is the index stored on the DistanceSet, b is the index of the smallest values.