connections-0.0.1: Partial orders, Galois connections, ordered semirings, & residuated lattices.

Safe HaskellSafe
LanguageHaskell2010

Data.Dioid.Interval

Description

Synopsis

Documentation

data Interval a Source #

Instances
Eq a => Eq (Interval a) Source # 
Instance details

Defined in Data.Dioid.Interval

Methods

(==) :: Interval a -> Interval a -> Bool #

(/=) :: Interval a -> Interval a -> Bool #

Show a => Show (Interval a) Source # 
Instance details

Defined in Data.Dioid.Interval

Methods

showsPrec :: Int -> Interval a -> ShowS #

show :: Interval a -> String #

showList :: [Interval a] -> ShowS #

Ord a => Prd (Interval a) Source # 
Instance details

Defined in Data.Dioid.Interval

(...) :: Prd a => a -> a -> Interval a infix 3 Source #

Construct an interval from a pair of points.

If a <~ b then a ... b = Empty.

endpts :: Interval a -> Maybe (a, a) Source #

Obtain the endpoints of an interval.

singleton :: a -> Interval a Source #

Construct an interval containing a single point.

>>> singleton 1
1 ... 1

upset :: Max a => a -> Interval a Source #

\( X_\geq(x) = \{ y \in X | y \geq x \} \)

Construct the upper set of an element x.

This function is monotone wrt the containment order.

dnset :: Min a => a -> Interval a Source #

\( X_\leq(x) = \{ y \in X | y \leq x \} \)

Construct the lower set of an element x.

This function is antitone wrt the containment order.

empty :: Interval a Source #

The empty interval.

>>> empty
Empty