limp-0.3.2.3: representation of Integer Linear Programs

Numeric.Limp.Program.Constraint

Synopsis

# Documentation

data Constraint z r c where Source #

Different kind of constraints.

These are not all necessary, but I have a hunch that keeping some structure may be helpful in the future.

Constructors:

:==
Equality constraint
:<=
Less than or equal
:<
Strictly less than: this is only allowed for purely integer functions
:>=
Greater than or equal
:>
Strictly greater than: this is only allowed for purely integer functions
Between
Between a b c is equivalent to a :<= b :&& b :<= c
:&&
Conjunction of two constraints
:!
"name" :! constr Annotate a constraint with a name, or other useless information
CTrue
Trivially true constraint

Constructors

 (:==) :: Linear z r c k1 -> Linear z r c k2 -> Constraint z r c infix 5 (:<=) :: Linear z r c k1 -> Linear z r c k2 -> Constraint z r c infix 5 (:<) :: Linear z r c KZ -> Linear z r c KZ -> Constraint z r c infix 5 (:>=) :: Linear z r c k1 -> Linear z r c k2 -> Constraint z r c infix 5 (:>) :: Linear z r c KZ -> Linear z r c KZ -> Constraint z r c infix 5 Between :: Linear z r c k1 -> Linear z r c k2 -> Linear z r c k3 -> Constraint z r c (:&&) :: Constraint z r c -> Constraint z r c -> Constraint z r c infixr 3 (:!) :: String -> Constraint z r c -> Constraint z r c infix 4 CTrue :: Constraint z r c
Instances
 (Show z, Show r, Show (Z c), Show (R c)) => Show (Constraint z r c) Source # Instance detailsDefined in Numeric.Limp.Program.Constraint MethodsshowsPrec :: Int -> Constraint z r c -> ShowS #show :: Constraint z r c -> String #showList :: [Constraint z r c] -> ShowS # Semigroup (Constraint z r c) Source # Instance detailsDefined in Numeric.Limp.Program.Constraint Methods(<>) :: Constraint z r c -> Constraint z r c -> Constraint z r c #sconcat :: NonEmpty (Constraint z r c) -> Constraint z r c #stimes :: Integral b => b -> Constraint z r c -> Constraint z r c # Monoid (Constraint z r c) Source # Instance detailsDefined in Numeric.Limp.Program.Constraint Methodsmempty :: Constraint z r c #mappend :: Constraint z r c -> Constraint z r c -> Constraint z r c #mconcat :: [Constraint z r c] -> Constraint z r c #