SCIPsortedvecFindInd

Function SCIPsortedvecFindInd 

Source
pub unsafe extern "C" fn SCIPsortedvecFindInd(
    indarray: *mut c_int,
    indcomp: Option<unsafe extern "C" fn(dataptr: *mut c_void, ind1: c_int, ind2: c_int) -> c_int>,
    dataptr: *mut c_void,
    val: c_int,
    len: c_int,
    pos: *mut c_int,
) -> c_uint
Expand description

Finds the position at which ‘val’ is located in the sorted vector by binary search. If the element exists, the method returns TRUE and stores the position of the element in ‘*pos’. If the element does not exist, the method returns FALSE and stores the position of the element that follows ‘val’ in the ordering in ‘*pos’, i.e., ‘*pos’ is the position at which ‘val’ would be inserted. Note that if the element is not found, ‘*pos’ may be equal to len if all existing elements are smaller than ‘val’.