package par_incr

  1. Overview
  2. Docs
Module type
Class type
type 'a t =
  1. | Never

    Never cut-off the computation

  2. | Always

    Always cut-off the computation

  3. | Phys_equal

    Cut off the computation based on physical equality (==)

  4. | Eq of 'a -> 'a -> bool

    Cutoff the computation based on the function passed

  5. | F of oldval:'a -> newval:'a -> bool

    Same functionality as Eq but the equality function uses named arguments


Defines different computation cutoff strategies

val attach : 'a t -> 'a incremental -> 'a incremental

Cutoff.attach cutoff incr attaches the given cutoff strategy to the incremental incr. The default cutoff in most cases is `Phys_equal`. So, this is useful in cases where you want somewhat different cutoff condition. Take floating point related computations for example, you may choose to ignore difference in values within some delta. For such cases, you can use this.


Innovation. Community. Security.