vertexenum-1.0.0.0: Vertex enumeration
Copyright(c) Stéphane Laurent 2023-2024
LicenseGPL-3
Maintainerlaurent_step@outlook.fr
Safe HaskellSafe-Inferred
LanguageHaskell2010

Geometry.VertexEnum

Description

Enumeration of the vertices of a convex polytope given by linear inequalities. See README for an example.

Synopsis

Documentation

data Constraint a Source #

Instances

Instances details
Show a => Show (Constraint a) Source # 
Instance details

Defined in Geometry.VertexEnum.Constraint

data Sense Source #

Constructors

Gt 
Lt 

Instances

Instances details
Show Sense Source # 
Instance details

Defined in Geometry.VertexEnum.Constraint

Methods

showsPrec :: Int -> Sense -> ShowS #

show :: Sense -> String #

showList :: [Sense] -> ShowS #

Eq Sense Source # 
Instance details

Defined in Geometry.VertexEnum.Constraint

Methods

(==) :: Sense -> Sense -> Bool #

(/=) :: Sense -> Sense -> Bool #

newVar :: Num a => VarIndex -> Var a Source #

new variable

(.>=) :: LinearCombination a -> a -> Constraint a infix 4 Source #

(.<=) :: LinearCombination a -> a -> Constraint a infix 4 Source #

linearCombination :: Num a => [(a, Var a)] -> LinearCombination a Source #

linear combination from list of terms

constant :: a -> LinearCombination a Source #

constant linear combination

vertexenum Source #

Arguments

:: Real a 
=> [Constraint a]

linear inequalities

-> Maybe [Double]

point satisfying the inequalities, Nothing for automatic point

-> IO [[Double]]

vertices of the polytope defined by the inequalities

Vertex enumeration

checkConstraints Source #

Arguments

:: Real a 
=> [Constraint a]

linear inequalities

-> [Double]

point to be tested

-> [(Double, Bool)]

difference and status for each constraint

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.

interiorPoint Source #

Arguments

:: Real a 
=> [Constraint a]

linear inequalities

-> IO [Double]

point fulfilling the inequaities

Returns a point fulfilling a list of inequalities