| Copyright | (c) Junaid Rasheed 2021-2022 |
|---|---|
| License | MPL |
| Maintainer | jrasheed178@gmail.com |
| Stability | experimental |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
LPPaver.Constraint.Util
Description
Module defining useful utility functions for the Constraint data type.
Synopsis
- constraintLeftSide :: Constraint -> [(String, Rational)]
- constraintRightSide :: Constraint -> Rational
- constraintVars :: [Constraint] -> [String]
- constraintsToSimplexConstraints :: [Constraint] -> ([PolyConstraint], Map String Integer)
Documentation
constraintLeftSide :: Constraint -> [(String, Rational)] Source #
Get the LHS of a Constraint
constraintRightSide :: Constraint -> Rational Source #
Get the LHS of a Constraint
constraintVars :: [Constraint] -> [String] Source #
Get a list of all variables in a list of Constraints
constraintsToSimplexConstraints :: [Constraint] -> ([PolyConstraint], Map String Integer) Source #
Convert a list of Constraints into a list of PolyConstraints.
The function returns a pair with the first item being a list of PolyConstraints and the second item being a mapping of String variables (from Constraints) to Integer variables (for PolyConstraints).