- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for Float64Slice (0.13 sec)
-
src/sort/sort.go
// Sort is a convenience method: x.Sort() calls Sort(x). func (x IntSlice) Sort() { Sort(x) } // Float64Slice implements Interface for a []float64, sorting in increasing order, // with not-a-number (NaN) values ordered before other values. type Float64Slice []float64 func (x Float64Slice) Len() int { return len(x) } // Less reports whether x[i] should be ordered before x[j], as required by the sort Interface.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 28 16:40:32 UTC 2023 - 10.1K bytes - Viewed (0) -
src/sort/sort_test.go
data := float64s a := Float64Slice(data[0:]) Sort(a) if !IsSorted(a) { t.Errorf("sorted %v", float64s) t.Errorf(" got %v", data) } } // Compare Sort with slices.Sort sorting a float64 slice containing NaNs. func TestSortFloat64sCompareSlicesSort(t *testing.T) { slice1 := slices.Clone(float64s[:]) slice2 := slices.Clone(float64s[:]) Sort(Float64Slice(slice1)) slices.Sort(slice2)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 07 19:41:04 UTC 2024 - 16.9K bytes - Viewed (0)