limp-0.3.2.3: representation of Integer Linear Programs

Safe HaskellNone
LanguageHaskell2010

Numeric.Limp.Canon.Linear

Description

Representation of subset of linear functions: only variables and coefficients, no constant summand

Synopsis

Documentation

data Linear z r c Source #

Linear function is represented as a map from either a integral variable or an real variable, to a real coefficient.

Constructors

Linear (Map (Either z r) (R c)) 
Instances
(Ord z, Ord r, Rep c) => Eq (Linear z r c) Source # 
Instance details

Defined in Numeric.Limp.Canon.Linear

Methods

(==) :: Linear z r c -> Linear z r c -> Bool #

(/=) :: Linear z r c -> Linear z r c -> Bool #

(Ord z, Ord r, Rep c) => Ord (Linear z r c) Source # 
Instance details

Defined in Numeric.Limp.Canon.Linear

Methods

compare :: Linear z r c -> Linear z r c -> Ordering #

(<) :: Linear z r c -> Linear z r c -> Bool #

(<=) :: Linear z r c -> Linear z r c -> Bool #

(>) :: Linear z r c -> Linear z r c -> Bool #

(>=) :: Linear z r c -> Linear z r c -> Bool #

max :: Linear z r c -> Linear z r c -> Linear z r c #

min :: Linear z r c -> Linear z r c -> Linear z r c #

mkLinear :: (Ord z, Ord r, Rep c) => [(Either z r, R c)] -> Linear z r c Source #

Create linear function from list of variables and coefficients

evalR :: (Rep c, Ord z, Ord r) => Assignment z r c -> Linear z r c -> R c Source #

Evaluate linear function with given assignment

varsOfLinear :: (Ord z, Ord r) => Linear z r c -> Set (Either z r) Source #

Find set of all variables mentioned in function