package union-find-lattice

  1. Overview
  2. Docs
Persistent union-find data-structures with lattice operations (order, meet, join)

Install

dune-project
 Dependency

Authors

Maintainers

Sources

union-find-lattice-0.1.0.tbz
sha256=ecaf1444cd0e9d21174d854da0d2eea56d685180cc1e098016e2c66bc809f8ab
sha512=f12612357504879f78094ffa623bf44ec87c7f7adeeea1809c0b74fdf41e51a88958634d51d3f8bd8881c577a635ef81beaff91d0361195f9a65a5724ce096a9

doc/union-find-lattice.utils/Utils/Range/index.html

Module Utils.RangeSource

Integer ranges (0..n or lo..high), for quick iteration. Inspired by python's range used in for loop, but with a more functional approach.

Sourcetype t = {
  1. start : int;
    (*

    included

    *)
  2. stop : int;
    (*

    excluded

    *)
  3. step : int;
}
Sourceval upto : int -> t

upto x is range 0,1,..,x-1

Sourceval interval : int -> int -> t

interval los high is range lo, lo+1, .., high-1

Sourceval inclusive_interval : int -> int -> t

inclusive_interval los high is range lo, lo+1, .., high

Sourceval iter : (int -> unit) -> t -> unit
Sourceval fold : (int -> 'acc -> 'acc) -> t -> 'acc -> 'acc
Sourceval forall : (int -> bool) -> t -> bool
Sourceval exists : (int -> bool) -> t -> bool
Sourceval sum : (int -> int) -> t -> int

sum f r is the f r.start + f (r.start+r.step) + ...

Sourceval count : (int -> bool) -> t -> int

count f r counts the number of elements of r that satisfy f

Sourceval pp : Format.formatter -> t -> unit
Sourceval to_list : t -> int list
Sourceval to_seq : t -> int Seq.t