toysolver-0.3.0: Assorted decision procedures for SAT, Max-SAT, PB, MIP, etc

Copyright(c) Masahiro Sakai 2011
LicenseBSD-style
Maintainermasahiro.sakai@gmail.com
Stabilityprovisional
Portabilitynon-portable (ScopedTypeVariables)
Safe HaskellNone
LanguageHaskell2010

ToySolver.Arith.Simplex

Contents

Description

Naïve implementation of Simplex method

Reference:

Synopsis

The Tableau type

type Tableau r = VarMap (Row r) Source

type RowIndex = Int Source

Basic variables

type ColIndex = Int Source

Non-basic variables

type Row r = (VarMap r, r) Source

lookupRow :: RowIndex -> Tableau r -> Row r Source

Lookup a row by basic variable

addRow :: (Num r, Eq r) => Tableau r -> RowIndex -> Row r -> Tableau r Source

setObjFun :: (Num r, Eq r) => Tableau r -> Expr r -> Tableau r Source

Optimization direction

Reading status

currentValue :: Num r => Tableau r -> Var -> r Source

High-level solving functions

For debugging

toCSV :: (Num r, Eq r, Show r) => (r -> String) -> Tableau r -> String Source