Gaussian Elimination algorithm #
The first step of Linarith.SimplexAlgorithm.findPositiveVector
is finding initial feasible
solution which is done by standard Gaussian Elimination algorithm implemented in this file.
def
Linarith.SimplexAlgorithm.Gauss.findNonzeroRow
{n : Nat}
{m : Nat}
{matType : Nat → Nat → Type}
[Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm matType]
(rowStart : Nat)
(col : Nat)
:
Linarith.SimplexAlgorithm.Gauss.GaussM n m matType (Option Nat)
Finds the first row starting from the rowStart
with nonzero element in the column col
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Linarith.SimplexAlgorithm.Gauss.getTableauImp
{n : Nat}
{m : Nat}
{matType : Nat → Nat → Type}
[Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm matType]
:
Linarith.SimplexAlgorithm.Gauss.GaussM n m matType (Linarith.SimplexAlgorithm.Tableau matType)
Implementation of getTableau
in GaussM
monad.
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Linarith.SimplexAlgorithm.Gauss.getTableau
{n : Nat}
{m : Nat}
{matType : Nat → Nat → Type}
[Linarith.SimplexAlgorithm.UsableInSimplexAlgorithm matType]
(A : matType n m)
:
Given matrix A
, solves the linear equation A x = 0
and returns the solution as a tableau where
some variables are free and others (basic) variable are expressed as linear combinations of the free
ones.
Equations
- Linarith.SimplexAlgorithm.Gauss.getTableau A = (do let __do_lift ← StateT.run Linarith.SimplexAlgorithm.Gauss.getTableauImp A pure __do_lift.fst).run