module type S_invertible = Piecewise_linear_intf.S_invertible
include Piecewise_linear_intf.S
create
enforces that the x (key) values are strictly increasing. It also enforces
that the y (value) values are either strictly increasing or strictly
decreasing. These two properties give us invertibility.
It also enforces certain finiteness conditions: the x and y values must be finite (non-nan, and non-infinite), and differences of consecutive x values and consecutive y values must be finite.
(Conceivably, one might have a case where one wants to loosen the conditions on
x and y values to non-strict monotonicity, so that one does not have true
invertibility, but only a sort of formal invertibility. If that use case
arises, a separate functor like Make_formally_invertible
could be added,
so that Make_invertible
maintains its stricter semantics.)
val get_inverse : t -> value -> key
get_inverse t value
is the inverse operation of get t key
.