-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Vertex enumeration -- -- Vertex enumeration of convex polytopes given by linear inequalities. @package vertexenum @version 1.0.0.0 -- | Enumeration of the vertices of a convex polytope given by linear -- inequalities. See README for an example. module Geometry.VertexEnum data Constraint a Constraint :: LinearCombination a -> Sense -> LinearCombination a -> Constraint a type Var a = LinearCombination a data Sense Gt :: Sense Lt :: Sense newtype LinearCombination a LinearCombination :: IntMap a -> LinearCombination a type VarIndex = Int -- | new variable newVar :: Num a => VarIndex -> Var a (.>=.) :: LinearCombination a -> LinearCombination a -> Constraint a infix 4 .>=. (.<=.) :: LinearCombination a -> LinearCombination a -> Constraint a infix 4 .<=. (.>=) :: LinearCombination a -> a -> Constraint a infix 4 .>= (.<=) :: LinearCombination a -> a -> Constraint a infix 4 .<= -- | linear combination from list of terms linearCombination :: Num a => [(a, Var a)] -> LinearCombination a -- | constant linear combination constant :: a -> LinearCombination a -- | alias for constant cst :: a -> LinearCombination a -- | Vertex enumeration vertexenum :: Real a => [Constraint a] -> Maybe [Double] -> IO [[Double]] -- | Checks whether a point fulfills some inequalities; returns the -- difference between the upper member and the lower member for each -- inequality, which is positive in case if the inequality is fulfilled. checkConstraints :: Real a => [Constraint a] -> [Double] -> [(Double, Bool)] -- | Returns a point fulfilling a list of inequalities interiorPoint :: Real a => [Constraint a] -> IO [Double]