Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for Float64Slice (0.24 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/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)
Back to top