Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for Float64Slice (0.41 sec)

  1. src/sort/sort_impl_120.go

    package sort
    
    func intsImpl(x []int)         { Sort(IntSlice(x)) }
    func float64sImpl(x []float64) { Sort(Float64Slice(x)) }
    func stringsImpl(x []string)   { Sort(StringSlice(x)) }
    
    func intsAreSortedImpl(x []int) bool         { return IsSorted(IntSlice(x)) }
    func float64sAreSortedImpl(x []float64) bool { return IsSorted(Float64Slice(x)) }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jul 21 13:00:18 UTC 2023
    - 602 bytes
    - Viewed (0)
  2. 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)
  3. src/sort/search_test.go

    }{
    	{"SearchInts", SearchInts(data, 11), 8},
    	{"SearchFloat64s", SearchFloat64s(fdata, 2.1), 4},
    	{"SearchStrings", SearchStrings(sdata, ""), 0},
    	{"IntSlice.Search", IntSlice(data).Search(0), 2},
    	{"Float64Slice.Search", Float64Slice(fdata).Search(2.0), 3},
    	{"StringSlice.Search", StringSlice(sdata).Search("x"), 3},
    }
    
    func TestSearchWrappers(t *testing.T) {
    	for _, e := range wrappertests {
    		if e.result != e.i {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 07 14:42:13 UTC 2022
    - 6.8K bytes
    - Viewed (0)
  4. src/sort/search.go

    func (p IntSlice) Search(x int) int { return SearchInts(p, x) }
    
    // Search returns the result of applying [SearchFloat64s] to the receiver and x.
    func (p Float64Slice) Search(x float64) int { return SearchFloat64s(p, x) }
    
    // Search returns the result of applying [SearchStrings] to the receiver and x.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 28 16:40:32 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  5. 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)
  6. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"Sort", Func, 21},
    		{"SortFunc", Func, 21},
    		{"SortStableFunc", Func, 21},
    	},
    	"sort": {
    		{"(Float64Slice).Len", Method, 0},
    		{"(Float64Slice).Less", Method, 0},
    		{"(Float64Slice).Search", Method, 0},
    		{"(Float64Slice).Sort", Method, 0},
    		{"(Float64Slice).Swap", Method, 0},
    		{"(IntSlice).Len", Method, 0},
    		{"(IntSlice).Less", Method, 0},
    		{"(IntSlice).Search", Method, 0},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
Back to top