interval-algebra

Please see the README on GitHub at https://github.com/novisci/interval-algebra


Keywords
bsd3, library, program, time, Propose Tags , https://github.com/novisci/interval-algebra, Skip to Readme, Index, Quick Jump, IntervalAlgebra, IntervalAlgebra.Arbitrary, IntervalAlgebra.Axioms, IntervalAlgebra.Core, IntervalAlgebra.IntervalDiagram, IntervalAlgebra.IntervalUtilities, IntervalAlgebra.PairedInterval, IntervalAlgebra.RelationProperties, interval-algebra-2.2.0.tar.gz, browse, Package description, Package maintainers, bradleysaul, brendanrbrown, edit package information , 0.2.0, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.4.0, 0.5.0, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.7.0, 0.7.1, 0.8.0, 0.8.1, 0.8.2, 1.1.1, 1.1.2, 1.1.3, 2.0.2, 2.1.0, 2.1.2, 2.1.3, 2.2.0, Allen's interval algebra, Haskell, Allen (1983), Allen and Hayes (1987), found here, includes tests, Allen and Hayes (1987)
License
BSD-3-Clause
Install
cabal install interval-algebra-2.2.0

Documentation

interval-algebra

The interval-algebra package implements Allen's interval algebra in Haskell. The main module provides data types and related classes for the interval-based temporal logic described in Allen (1983) and axiomatized in Allen and Hayes (1987). A good primer on Allen's algebra can be found here.

Design

The module is built around three typeclasses designed to separate concerns of constructing, relating, and combining types that contain Intervals:

  1. Intervallic provides an interface to the data structures which contain an Interval.
  2. IntervalCombinable provides an interface to methods of combining two Intervals.
  3. IntervalSizeable provides methods for measuring and modifying the size of an interval.

An advantage of nested typeclass design is that developers can define an Interval of type a with just the amount of structure that they need.

Axiom tests

The package includes tests that the functions of the IntervalAlgebraic typeclass meets the axioms for intervals (not points) as laid out in Allen and Hayes (1987).