Skip to main content

stamp_range_insertion_index

Function stamp_range_insertion_index 

Source
pub fn stamp_range_insertion_index(
    bases: &[i64],
    lasts: &[i64],
    new_base: i64,
    new_last: i64,
) -> Option<usize>
Expand description

Return the sorted insertion position for one nonoverlapping range.

bases and lasts must have equal lengths and describe sorted, individually ordered, pairwise nonoverlapping inclusive ranges. Use stamp_ranges_valid to check these preconditions before calling.

A lasts shorter than bases breaks the precondition and the answer is unspecified. Proof annotations do not validate inputs in ordinary Rust builds.