Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SearchL ¶
SearchL is a binary search variant, which uses an indicator func f(i), and finds the index of the last element, and the element itself, which returns true.
Example search space: index: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 values: 1, 1, 1, 1, 1, 0, 0, 0, 0, 0
SearchL would return: index 4 and f(4) Returns -1, if f(i) returns false for all i in [0,n) Returns n-1, if f(i) returns true for all i in [0,n)
func SearchWithError ¶ added in v1.13.6
SearchWithError is like sort.Search but allows f to return an error, and exits earlier on error. The int value returned is the same as what sort.Search returns if no error.
Types ¶
This section is empty.
 Click to show internal directories. 
   Click to hide internal directories.