Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for choosePivotCmpFunc (0.14 sec)

  1. src/slices/zsortanyfunc.go

    			}
    			data[idx], data[a+other] = data[a+other], data[idx]
    		}
    	}
    }
    
    // choosePivotCmpFunc chooses a pivot in data[a:b].
    //
    // [0,8): chooses a static pivot.
    // [8,shortestNinther): uses the simple median-of-three method.
    // [shortestNinther,∞): uses the Tukey ninther method.
    func choosePivotCmpFunc[E any](data []E, a, b int, cmp func(a, b E) int) (pivot int, hint sortedHint) {
    	const (
    		shortestNinther = 50
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 23 23:33:29 UTC 2023
    - 12.8K bytes
    - Viewed (0)
Back to top