code: func (s *Sample) Sort() *Sample {
  	if s.Sorted || sort.Float64sAreSorted(s.Xs) {
  		// All set
  	} else if s.Weights == nil {
  		sort.Float64s(s.Xs)
  	} else {
  		sort.Sort(&sampleSorter{s.Xs, s.Weights})
  	}
  	s.Sorted = true
  	return s
  }
docs: // Sort sorts the samples in place in s and returns s.
  //
  // A sorted sample improves the performance of some algorithms.