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

Data.Dioid.Interval

Synopsis

# Documentation

data Interval a Source #

Instances
 Eq a => Eq (Interval a) Source # Instance detailsDefined in Data.Dioid.Interval Methods(==) :: Interval a -> Interval a -> Bool #(/=) :: Interval a -> Interval a -> Bool # Show a => Show (Interval a) Source # Instance detailsDefined in Data.Dioid.Interval MethodsshowsPrec :: Int -> Interval a -> ShowS #show :: Interval a -> String #showList :: [Interval a] -> ShowS # Ord a => Prd (Interval a) Source # Instance detailsDefined in Data.Dioid.Interval Methods(<~) :: Interval a -> Interval a -> Bool Source #(>~) :: Interval a -> Interval a -> Bool Source #(=~) :: Interval a -> Interval a -> Bool Source #(?~) :: Interval a -> Interval a -> Bool Source #

(...) :: 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.

The empty interval.

>>> empty
Empty