-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Linear Programming basic definitions -- -- Basic types and generic functions for use in the packages -- coinor-clp and comfort-glpk. @package linear-programming @version 0.0 module Numeric.LinearProgramming.Common data Term a ix Term :: a -> ix -> Term a ix (.*) :: a -> ix -> Term a ix infix 7 .* data Inequality x Inequality :: x -> Bound -> Inequality x data Bound LessEqual :: Double -> Bound GreaterEqual :: Double -> Bound Between :: Double -> Double -> Bound Equal :: Double -> Bound Free :: Bound type Bounds ix = [Inequality ix] type Constraints a ix = [Inequality [Term a ix]] data Direction Minimize :: Direction Maximize :: Direction type Objective sh = Array sh Double free :: x -> Inequality x (<=.) :: x -> Double -> Inequality x infix 4 <=. (>=.) :: x -> Double -> Inequality x infix 4 >=. (==.) :: x -> Double -> Inequality x infix 4 ==. (>=<.) :: x -> (Double, Double) -> Inequality x infix 4 >=<. objectiveFromTerms :: (Indexed sh, Index sh ~ ix) => sh -> [Term Double ix] -> Objective sh instance (GHC.Show.Show a, GHC.Show.Show ix) => GHC.Show.Show (Numeric.LinearProgramming.Common.Term a ix) instance GHC.Show.Show Numeric.LinearProgramming.Common.Bound instance GHC.Show.Show x => GHC.Show.Show (Numeric.LinearProgramming.Common.Inequality x) instance GHC.Show.Show Numeric.LinearProgramming.Common.Direction instance GHC.Enum.Bounded Numeric.LinearProgramming.Common.Direction instance GHC.Enum.Enum Numeric.LinearProgramming.Common.Direction instance GHC.Classes.Eq Numeric.LinearProgramming.Common.Direction instance GHC.Base.Functor Numeric.LinearProgramming.Common.Inequality module Numeric.LinearProgramming.Format class Identifier ix mathProg :: (Indexed sh, Index sh ~ ix, Identifier ix) => Bounds ix -> Constraints ix -> (Direction, Objective sh) -> [String] instance Numeric.LinearProgramming.Format.Identifier GHC.Types.Char instance Numeric.LinearProgramming.Format.Identifier c => Numeric.LinearProgramming.Format.Identifier [c] instance Numeric.LinearProgramming.Format.Identifier GHC.Types.Int instance Numeric.LinearProgramming.Format.Identifier GHC.Num.Integer.Integer -- | Generic implementation of a monad that collects constraints over -- multiple stages. It can be used to test solvers that allow for warm -- start or for solvers that do not allow for warm start at all (like -- GLPK's interior point solver). module Numeric.LinearProgramming.Monad data T sh a run :: (Indexed sh, Index sh ~ ix) => sh -> Bounds ix -> T sh a -> a lift :: (Eq sh, Indexed sh, Index sh ~ ix) => (Bounds ix -> Constraints Double ix -> (Direction, Objective sh) -> a) -> Constraints Double ix -> (Direction, Objective sh) -> T sh a instance GHC.Base.Monad (Numeric.LinearProgramming.Monad.T sh) instance GHC.Base.Applicative (Numeric.LinearProgramming.Monad.T sh) instance GHC.Base.Functor (Numeric.LinearProgramming.Monad.T sh) module Numeric.LinearProgramming.Test class (Storable a, Random a, Num a, Ord a) => Element a forAllOrigin :: Testable prop => (Array (Range Char) Int64 -> prop) -> Property forAllProblem :: (Indexed sh, Index sh ~ ix, Show ix) => (Testable prop, Element a) => Array sh a -> (Bounds ix -> Constraints ix -> prop) -> Property genObjective :: (Indexed sh, Index sh ~ ix, Element a) => Array sh a -> Gen (Direction, Objective sh) forAllObjectives :: (Indexed sh, Index sh ~ ix, Show ix) => (Testable prop, Element a) => Array sh a -> (T [] (Direction, [Term (Index sh)]) -> prop) -> Property successiveObjectives :: (Indexed sh, Index sh ~ ix) => Array sh a -> Double -> T [] (Direction, [Term ix]) -> ((Direction, Objective sh), [(Double -> Constraints ix, (Direction, Objective sh))]) approxReal :: (Ord a, Num a) => a -> a -> a -> Bool approx :: (PrintfArg a, Ord a, Num a) => String -> a -> a -> a -> Property checkFeasibility :: (Indexed sh, Index sh ~ ix) => Double -> Bounds ix -> Constraints ix -> Array sh Double -> Property affineCombination :: (C sh, Eq sh, Storable a, Num a) => a -> Array sh a -> Array sh a -> Array sh a scalarProduct :: (C sh, Eq sh, Storable a, Num a) => Array sh a -> Array sh a -> a instance Numeric.LinearProgramming.Test.Element GHC.Types.Double instance Numeric.LinearProgramming.Test.Element GHC.Int.Int64