Functor Piecewise_linear.Make

module Make: 
functor (Key : Piecewise_linear_intf.Float_like) ->
functor (Value : Piecewise_linear_intf.Float_like) -> S with type key = Key.t with type value = Value.t
Parameters:
Key : Piecewise_linear_intf.Float_like
Value : Piecewise_linear_intf.Float_like

type key 
type value 
type t 
val create : (key * value) list ->
t Core_kernel.Std.Or_error.t
create enforces that x (key) values are non-decreasing.

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.

val get : t ->
key -> value
get t x evaluates the piecewise linear function t at x.

It is possible to get discontinuous functions by using repeated x-values in the knots. In that case, the function is evaluated in such a way that it is right-continuous. For example, if t has knots [(0.,0.5); (1.,1.5); (1.,10.); (2.,11.)], then get t 1. returns 10., get t 0.999 returns 1.499, and get t 1.001 returns 10.001.

val to_knots : t ->
(key * value) list
val compare : t -> t -> int
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val bin_t : t Core_kernel.Std.Bin_prot.Type_class.t
val bin_read_t : t Core_kernel.Std.Bin_prot.Read_ml.reader
val bin_read_t_ : t Core_kernel.Std.Bin_prot.Unsafe_read_c.reader
val bin_read_t__ : (int -> t)
Core_kernel.Std.Bin_prot.Unsafe_read_c.reader
val bin_reader_t : t Core_kernel.Std.Bin_prot.Type_class.reader
val bin_size_t : t Core_kernel.Std.Bin_prot.Size.sizer
val bin_write_t : t Core_kernel.Std.Bin_prot.Write_ml.writer
val bin_write_t_ : t Core_kernel.Std.Bin_prot.Unsafe_write_c.writer
val bin_writer_t : t Core_kernel.Std.Bin_prot.Type_class.writer

create enforces that x (key) values are non-decreasing.

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.

get t x evaluates the piecewise linear function t at x.

It is possible to get discontinuous functions by using repeated x-values in the knots. In that case, the function is evaluated in such a way that it is right-continuous. For example, if t has knots [(0.,0.5); (1.,1.5); (1.,10.); (2.,11.)], then get t 1. returns 10., get t 0.999 returns 1.499, and get t 1.001 returns 10.001.