Copyright | (c) Masahiro Sakai 2011-2013 |
---|---|
License | BSD-style |
Maintainer | masahiro.sakai@gmail.com |
Stability | provisional |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Naïve implementation of Fourier-Motzkin Variable Elimination
Reference:
- type ExprZ = Expr Integer
- type Rat = (ExprZ, Integer)
- toRat :: Expr Rational -> Rat
- fromRat :: Rat -> Expr Rational
- data Lit
- leR :: Rat -> Rat -> Lit
- ltR :: Rat -> Rat -> Lit
- geR :: Rat -> Rat -> Lit
- gtR :: Rat -> Rat -> Lit
- simplify :: [Lit] -> Maybe [Lit]
- fromLAAtom :: Atom Rational -> DNF Lit
- toLAAtom :: Lit -> Atom Rational
- constraintsToDNF :: [Atom Rational] -> DNF Lit
- type BoundsR = ([Rat], [Rat], [Rat], [Rat])
- collectBounds :: Var -> [Lit] -> (BoundsR, [Lit])
- boundsToLits :: BoundsR -> Maybe [Lit]
- evalBounds :: Model Rational -> BoundsR -> Interval Rational
- project :: Var -> [Atom Rational] -> [([Atom Rational], Model Rational -> Model Rational)]
- project' :: Var -> [Lit] -> Maybe ([Lit], Model Rational -> Model Rational)
- projectN :: VarSet -> [Atom Rational] -> [([Atom Rational], Model Rational -> Model Rational)]
- projectN' :: VarSet -> [Lit] -> Maybe ([Lit], Model Rational -> Model Rational)
- solve :: VarSet -> [Atom Rational] -> Maybe (Model Rational)
- solve' :: VarSet -> [Lit] -> Maybe (Model Rational)