Safe Haskell | None |
---|---|
Language | Haskell2010 |
Convert linear constraints that only mention one variable to bounds
- type Bound z r c = (Either z r, (Maybe (R c), Maybe (R c)))
- bounderConstraint1 :: (Ord z, Ord r, Rep c) => Constraint1 z r c -> Either Infeasible (Maybe (Bound z r c))
- bounderConstraint :: (Ord z, Ord r, Rep c) => Constraint z r c -> Either Infeasible (Constraint z r c, [Bound z r c])
- bounderProgram :: (Ord z, Ord r, Rep c) => Program z r c -> Either Infeasible (Program z r c)
Documentation
bounderConstraint1 :: (Ord z, Ord r, Rep c) => Constraint1 z r c -> Either Infeasible (Maybe (Bound z r c)) Source #
Convert a single constraint into a bound, if possible.
bounder $ Constraint (5 <= y <= 10) == Bound (Just 5) y (Just 10)
bounder $ Constraint (5 <= 2y <= 10) == Bound (Just 2.5) y (Just 5)
bounder $ Constraint (10 <= 2y <= 5) == Left InfeasibleBoundEmpty
bounderConstraint :: (Ord z, Ord r, Rep c) => Constraint z r c -> Either Infeasible (Constraint z r c, [Bound z r c]) Source #
bounderProgram :: (Ord z, Ord r, Rep c) => Program z r c -> Either Infeasible (Program z r c) Source #