Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Search ¶
binary search: return the smallest i < n such that pred(i) is true. assumes that pred(x) is always false up to a certain x, then always true. if pred(n-1) is false, return n.
func SearchInts ¶
binary search: return the smallest i < len(data) such that data[i] >= x. assumes that data[] is sorted in ascending order. if data[len(data)-1] < x, return n
Types ¶
Click to show internal directories.
Click to hide internal directories.