limp-0.3.2.2: representation of Integer Linear Programs

Safe HaskellNone
LanguageHaskell2010

Numeric.Limp.Canon.Constraint

Description

Representation of linear constraints

Synopsis

Documentation

data Constraint z r c Source #

Conjunction of simple constraints

Constructors

Constraint [Constraint1 z r c] 

data Constraint1 z r c Source #

A simple constraint

Constructors

C1 (Maybe (R c)) (Linear z r c) (Maybe (R c))

Maybe a lower bound, a linear function, and maybe an upper bound.

In order to be meaningful, at least one of lower or upper bound should be Just.

check :: (Rep c, Ord z, Ord r) => Assignment z r c -> Constraint z r c -> Bool Source #

Check whether an assignment satisfies the constraint

varsOfConstraint :: (Ord z, Ord r) => Constraint z r c -> Set (Either z r) Source #

Get set of variables in constraint