Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for Float64Slice (0.34 sec)

  1. test/closure6.go

    // compile
    
    // Copyright 2020 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package p
    
    type Float64Slice []float64
    
    func (a Float64Slice) Search1(x float64) int {
    	f := func(q int) bool { return a[q] >= x }
    	i := 0
    	if !f(3) {
    		i = 5
    	}
    	return i
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Jan 23 02:15:24 UTC 2021
    - 346 bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. api/go1.txt

    pkg sort, func Strings([]string)
    pkg sort, func StringsAreSorted([]string) bool
    pkg sort, method (Float64Slice) Len() int
    pkg sort, method (Float64Slice) Less(int, int) bool
    pkg sort, method (Float64Slice) Search(float64) int
    pkg sort, method (Float64Slice) Sort()
    pkg sort, method (Float64Slice) Swap(int, int)
    pkg sort, method (IntSlice) Len() int
    pkg sort, method (IntSlice) Less(int, int) bool
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 14 18:58:28 UTC 2013
    - 1.7M bytes
    - Viewed (0)
Back to top