Page
Library
Module
Module type
Parameter
Class
Class type
Source
Interval_map.MakeSourcemodule Bound_compare : Comparablesize map returns the number of values stored in the map. Multiple values may be stored with each interval, so the number of values is not necessarily the same as the number of intervals.
add interval value map adds value to map associated with interval. Not tail recursive.
remove_by interval value_rm_fn map removes all values associated with interval for which value_rm_fn returns true in map. Not tail recursive.
remove_interval interval map removes the interval and all associated values from map. Not tail recursive.
generator order map creates a generator that traverses map. See Gen for generator API.
fold fn map acc folds over map applying function fn in ascending order of the intervals. fn takes the interval, values, and the accumulator as parameters and returns the updated accumulator. Tail recursive.
mapi fn map builds a new interval map by applying fn to the elements in map. Elements are not traversed in order. Tail recursive.
map fn map is like mapi but fn does not receive the interval. Tail recursive.
iteri fn map applies fn to every element of the map in ascending order of the intervals. fn received both the interval and associated values and returns unit. Tail recursive.
iter fn map is like iteri but fn does not receive the interval. Tail recursive.
to_list map converts map into a list where the elements of the resulting list are in ascending order by interval. Tail recursive.
to_seq map converts map into a Seq.t where the elements of the resulting seq are in ascending order by interval. Seqs are lazy so elements of the map are not traversed until the resulting seq is traversed.
find_opt interval map finds all values associated with interval in map, or None if map does not contain interval. Tail recursive.
find interval map finds all values associated with interval in map, or raises Not_found if map does not contain interval. Tail recursive.
mem interval map returns true if map contains interval, and false otherwise. Tail recursive.
query_interval interval map finds all values associated with interval in the map. Results are provided as a generator, which traverses the map as results are read.
query_interval interval map finds all values associated with interval in the map and returns the results as a list. Tail recursive.