package incremental

  1. Overview
  2. Docs
Library for incremental computations

Install

Dune Dependency

Authors

Maintainers

Sources

v0.16.1.tar.gz
md5=c1c01831c72847296ce2569d2cc4372f
sha512=0116a82509c9037529092c5a31bdc8f0c64ed3d4c7a58a67f5250685196c9830e352100c83185bba8b2db949ffc9e3f39a0bbfe14c07e0da63e0302ca24aaa7a

doc/incremental.incremental_step_function/Incremental_step_function/index.html

Module Incremental_step_functionSource

An 'a Step_function.t is a function from Time_ns.t to 'a.

Sourcetype 'a t
Sourceval sexp_of_t : ('a -> Sexplib0.Sexp.t) -> 'a t -> Sexplib0.Sexp.t
include Core.Invariant.S1 with type 'a t := 'a t
Sourceval invariant : 'a Base__Invariant_intf.inv -> 'a t Base__Invariant_intf.inv
Sourceval init : 'a t -> 'a
Sourceval steps : 'a t -> (Core.Time_ns.t * 'a) Core.Sequence.t
Sourceval value : 'a t -> at:Core.Time_ns.t -> 'a
Sourceval constant : 'a -> 'a t

constant a is the step function t with value t ~at = a for all at.

Sourceval create_exn : init:'a -> steps:(Core.Time_ns.t * 'a) list -> 'a t

create_exn ~init ~steps:[(t_1, v_1); ...; (t_n, vn)] is the step function t with value t ~at = init for at < t_1, value t ~at = vi for t_i <= at < t_i+1. create_exn raises if the times aren't in nondecreasing order, i.e. if for some i < j, ti > tj.

Sourceval create_from_sequence : init:'a -> steps:(Core.Time_ns.t * 'a) Core.Sequence.t -> 'a t
OCaml

Innovation. Community. Security.