toysolver-0.8.1: Assorted decision procedures for SAT, SMT, Max-SAT, PB, MIP, etc
Copyright(c) Masahiro Sakai 2011
LicenseBSD-style
Maintainermasahiro.sakai@gmail.com
Stabilityprovisional
Portabilitynon-portable
Safe HaskellSafe-Inferred
LanguageHaskell2010
Extensions
  • ScopedTypeVariables
  • ExplicitForAll

ToySolver.Arith.Simplex.Textbook

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

phaseI :: (Real r, Fractional r) => Tableau r -> VarSet -> (Bool, Tableau r) Source #

For debugging

toCSV :: Num r => (r -> String) -> Tableau r -> String Source #