Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- minimize :: LPMonad m => Expr m -> m (Objective m)
- maximize :: LPMonad m => Expr m -> m (Objective m)
- evalExpr :: LPMonad m => Expr m -> m (Numeric m)
- free :: LPMonad m => m (Variable m)
- nonNeg :: LPMonad m => m (Variable m)
- nonPos :: LPMonad m => m (Variable m)
- bounded :: LPMonad m => Numeric m -> Numeric m -> m (Variable m)
- within :: LPMonad m => m (Variable m) -> Bounds (Numeric m) -> m (Variable m)
- integer :: IPMonad m => m (Variable m)
- binary :: IPMonad m => m (Variable m)
- nonNegInteger :: IPMonad m => m (Variable m)
- nonPosInteger :: IPMonad m => m (Variable m)
- asKind :: IPMonad m => m (Variable m) -> Domain -> m (Variable m)
- named :: (Monad m, Nameable m a) => m a -> String -> m a
- nameOf :: (Monad m, Nameable m a) => a -> m String
- (#+@) :: Num a => a -> b -> LinearExpression a b
- (#+.) :: Num a => a -> LinearExpression a b -> LinearExpression a b
- (@+#) :: Num a => b -> a -> LinearExpression a b
- (@+@) :: Num a => b -> b -> LinearExpression a b
- (@+.) :: Num a => b -> LinearExpression a b -> LinearExpression a b
- (.+#) :: Num a => LinearExpression a b -> a -> LinearExpression a b
- (.+@) :: Num a => LinearExpression a b -> b -> LinearExpression a b
- (.+.) :: Num a => LinearExpression a b -> LinearExpression a b -> LinearExpression a b
- (#-@) :: Num a => a -> b -> LinearExpression a b
- (#-.) :: Num a => a -> LinearExpression a b -> LinearExpression a b
- (@-#) :: Num a => b -> a -> LinearExpression a b
- (@-@) :: Num a => b -> b -> LinearExpression a b
- (@-.) :: Num a => b -> LinearExpression a b -> LinearExpression a b
- (.-#) :: Num a => LinearExpression a b -> a -> LinearExpression a b
- (.-@) :: Num a => LinearExpression a b -> b -> LinearExpression a b
- (.-.) :: Num a => LinearExpression a b -> LinearExpression a b -> LinearExpression a b
- (#*.) :: Num a => a -> LinearExpression a b -> LinearExpression a b
- (.*#) :: Num a => LinearExpression a b -> a -> LinearExpression a b
- (#*@) :: Num a => a -> b -> LinearExpression a b
- (@*#) :: Num a => b -> a -> LinearExpression a b
- (@/#) :: Fractional a => b -> a -> LinearExpression a b
- (./#) :: Fractional a => LinearExpression a b -> a -> LinearExpression a b
- simplify :: (Ord b, Num a) => LinearExpression a b -> LinearExpression a b
- eval :: Num a => LinearExpression a a -> a
- var :: Num a => b -> LinearExpression a b
- con :: Num a => a -> LinearExpression a b
- exprSum :: Num a => [LinearExpression a b] -> LinearExpression a b
- varSum :: Num a => [b] -> LinearExpression a b
- (#<=@) :: LPMonad m => Numeric m -> Variable m -> m (Constraint m)
- (#<=.) :: LPMonad m => Numeric m -> Expr m -> m (Constraint m)
- (@<=#) :: LPMonad m => Variable m -> Numeric m -> m (Constraint m)
- (@<=@) :: LPMonad m => Variable m -> Variable m -> m (Constraint m)
- (@<=.) :: LPMonad m => Variable m -> Expr m -> m (Constraint m)
- (.<=#) :: LPMonad m => Expr m -> Numeric m -> m (Constraint m)
- (.<=@) :: LPMonad m => Expr m -> Variable m -> m (Constraint m)
- (.<=.) :: LPMonad m => Expr m -> Expr m -> m (Constraint m)
- (#>=@) :: LPMonad m => Numeric m -> Variable m -> m (Constraint m)
- (#>=.) :: LPMonad m => Numeric m -> Expr m -> m (Constraint m)
- (@>=#) :: LPMonad m => Variable m -> Numeric m -> m (Constraint m)
- (@>=@) :: LPMonad m => Variable m -> Variable m -> m (Constraint m)
- (@>=.) :: LPMonad m => Variable m -> Expr m -> m (Constraint m)
- (.>=#) :: LPMonad m => Expr m -> Numeric m -> m (Constraint m)
- (.>=@) :: LPMonad m => Expr m -> Variable m -> m (Constraint m)
- (.>=.) :: LPMonad m => Expr m -> Expr m -> m (Constraint m)
- (#==@) :: LPMonad m => Numeric m -> Variable m -> m (Constraint m)
- (#==.) :: LPMonad m => Numeric m -> Expr m -> m (Constraint m)
- (@==#) :: LPMonad m => Variable m -> Numeric m -> m (Constraint m)
- (@==@) :: LPMonad m => Variable m -> Variable m -> m (Constraint m)
- (@==.) :: LPMonad m => Variable m -> Expr m -> m (Constraint m)
- (.==#) :: LPMonad m => Expr m -> Numeric m -> m (Constraint m)
- (.==@) :: LPMonad m => Expr m -> Variable m -> m (Constraint m)
- (.==.) :: LPMonad m => Expr m -> Expr m -> m (Constraint m)
Documentation
evalExpr :: LPMonad m => Expr m -> m (Numeric m) Source #
Get the value of a linear expression in the current solution.
bounded :: LPMonad m => Numeric m -> Numeric m -> m (Variable m) Source #
Create a new variable bounded between two values.
within :: LPMonad m => m (Variable m) -> Bounds (Numeric m) -> m (Variable m) Source #
Constrain a variable to take on certain values.
This function is designed to be used as an infix operator, e.g.
addVariable
`within
`NonNegativeReals
nonNegInteger :: IPMonad m => m (Variable m) Source #
Create an integer-value variable that takes on non-negative values.
nonPosInteger :: IPMonad m => m (Variable m) Source #
Create an integer-value variable that takes on non-positive values.
asKind :: IPMonad m => m (Variable m) -> Domain -> m (Variable m) Source #
Set the type of a variable.
This function is designed to be used as an infix operator, e.g.
addVariable
`asKind
`Binary
nameOf :: (Monad m, Nameable m a) => a -> m String Source #
Retrieve the name of a variable, constraint, or objective.
(#+@) :: Num a => a -> b -> LinearExpression a b infixl 6 Source #
(#+.) :: Num a => a -> LinearExpression a b -> LinearExpression a b infixl 6 Source #
(@+#) :: Num a => b -> a -> LinearExpression a b infixl 6 Source #
(@+@) :: Num a => b -> b -> LinearExpression a b infixl 6 Source #
(@+.) :: Num a => b -> LinearExpression a b -> LinearExpression a b infixl 6 Source #
(.+#) :: Num a => LinearExpression a b -> a -> LinearExpression a b infixl 6 Source #
(.+@) :: Num a => LinearExpression a b -> b -> LinearExpression a b infixl 6 Source #
(.+.) :: Num a => LinearExpression a b -> LinearExpression a b -> LinearExpression a b infixl 6 Source #
(#-@) :: Num a => a -> b -> LinearExpression a b infixl 6 Source #
(#-.) :: Num a => a -> LinearExpression a b -> LinearExpression a b infixl 6 Source #
(@-#) :: Num a => b -> a -> LinearExpression a b infixl 6 Source #
(@-@) :: Num a => b -> b -> LinearExpression a b infixl 6 Source #
(@-.) :: Num a => b -> LinearExpression a b -> LinearExpression a b infixl 6 Source #
(.-#) :: Num a => LinearExpression a b -> a -> LinearExpression a b infixl 6 Source #
(.-@) :: Num a => LinearExpression a b -> b -> LinearExpression a b infixl 6 Source #
(.-.) :: Num a => LinearExpression a b -> LinearExpression a b -> LinearExpression a b infixl 6 Source #
(#*.) :: Num a => a -> LinearExpression a b -> LinearExpression a b infixl 7 Source #
(.*#) :: Num a => LinearExpression a b -> a -> LinearExpression a b infixl 7 Source #
(#*@) :: Num a => a -> b -> LinearExpression a b infixl 7 Source #
(@*#) :: Num a => b -> a -> LinearExpression a b infixl 7 Source #
(@/#) :: Fractional a => b -> a -> LinearExpression a b infixl 7 Source #
(./#) :: Fractional a => LinearExpression a b -> a -> LinearExpression a b infixl 7 Source #
simplify :: (Ord b, Num a) => LinearExpression a b -> LinearExpression a b Source #
Combine equivalent terms by summing their coefficients.
eval :: Num a => LinearExpression a a -> a Source #
Reduce an expression to its value.
var :: Num a => b -> LinearExpression a b Source #
Construct an expression representing a variable.
con :: Num a => a -> LinearExpression a b Source #
Construct an expression representing a constant.
exprSum :: Num a => [LinearExpression a b] -> LinearExpression a b Source #
Construct an expression by summing expressions.
varSum :: Num a => [b] -> LinearExpression a b Source #
Construct an expression by summing variables.