Copyright | (C) Frank Staals |
---|---|
License | see the LICENSE file |
Maintainer | Frank Staals |
Safe Haskell | None |
Language | Haskell2010 |
2D Linear programming in expected linear time.
Synopsis
- data LPSolution d r
- = NoSolution
- | Single !(Point d r)
- | UnBounded (HalfLine d r)
- _UnBounded :: forall d r. Prism' (LPSolution d r) (HalfLine d r)
- _Single :: forall d r. Prism' (LPSolution d r) (Point d r)
- _NoSolution :: forall d r. Prism' (LPSolution d r) ()
- data LinearProgram d r = LinearProgram {
- _objective :: !(Vector d r)
- _constraints :: [HalfSpace d r]
- objective :: forall d r. Lens' (LinearProgram d r) (Vector d r)
- constraints :: forall d r. Lens' (LinearProgram d r) [HalfSpace d r]
Documentation
data LPSolution d r Source #
Data type representing the solution to a linear program
NoSolution | |
Single !(Point d r) | |
UnBounded (HalfLine d r) |
Instances
(Arity d, Eq r) => Eq (LPSolution d r) Source # | |
Defined in Algorithms.Geometry.LinearProgramming.Types (==) :: LPSolution d r -> LPSolution d r -> Bool # (/=) :: LPSolution d r -> LPSolution d r -> Bool # | |
(Arity d, Show r) => Show (LPSolution d r) Source # | |
Defined in Algorithms.Geometry.LinearProgramming.Types showsPrec :: Int -> LPSolution d r -> ShowS # show :: LPSolution d r -> String # showList :: [LPSolution d r] -> ShowS # |
_UnBounded :: forall d r. Prism' (LPSolution d r) (HalfLine d r) Source #
_NoSolution :: forall d r. Prism' (LPSolution d r) () Source #
data LinearProgram d r Source #
LinearProgram | |
|
Instances
Arity d => Functor (LinearProgram d) Source # | |
Defined in Algorithms.Geometry.LinearProgramming.Types fmap :: (a -> b) -> LinearProgram d a -> LinearProgram d b # (<$) :: a -> LinearProgram d b -> LinearProgram d a # | |
(Arity d, Eq r) => Eq (LinearProgram d r) Source # | |
Defined in Algorithms.Geometry.LinearProgramming.Types (==) :: LinearProgram d r -> LinearProgram d r -> Bool # (/=) :: LinearProgram d r -> LinearProgram d r -> Bool # | |
(Arity d, Show r) => Show (LinearProgram d r) Source # | |
Defined in Algorithms.Geometry.LinearProgramming.Types showsPrec :: Int -> LinearProgram d r -> ShowS # show :: LinearProgram d r -> String # showList :: [LinearProgram d r] -> ShowS # |
constraints :: forall d r. Lens' (LinearProgram d r) [HalfSpace d r] Source #