Copyright | (c) Junaid Rasheed 2021-2022 |
---|---|
License | MPL |
Maintainer | jrasheed178@gmail.com |
Stability | experimental |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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 Constraint
s
constraintsToSimplexConstraints :: [Constraint] -> ([PolyConstraint], Map String Integer) Source #
Convert a list of Constraint
s into a list of PolyConstraint
s.
The function returns a pair with the first item being a list of PolyConstraint
s and the second item being a mapping of String
variables (from Constraint
s) to Integer
variables (for PolyConstraint
s).