| GaussJordanElimination Class |
The GaussJordanElimination data type provides methods to solve a linear system of equations Ax = B, where A is an N-by-N matrix and B is a length N vector. If no solution exists, it finds a solution Y to YA = 0, Yb != 0, which which serves as a certificate of infeasibility.
This implementation uses Gauss-Jordan elimination with partial pivoting. See for an implementation that uses Gaussian elimination (but does not provide the certificate of infeasibility). For an industrial-strength numerical linear algebra library, see JAMA.
Namespace: Algs4Net
public class GaussJordanElimination
The GaussJordanElimination type exposes the following members.
| Name | Description | |
|---|---|---|
| GaussJordanElimination |
Solves the linear system of equations Ax = B
where A is an N-by-N matrix and B
is a length N vector. |
| Name | Description | |
|---|---|---|
| IsFeasible |
Returns true if there exists a solution to the linear system of
equations Ax = B. |
| Name | Description | |
|---|---|---|
| Dual |
Returns a solution to the linear system of equations YA = 0,
Yb != 0. | |
| MainTest |
Demo test the GaussJordanElimination data type. | |
| Primal |
Returns a solution to the linear system of equations Ax = B. |
For additional documentation, see Section 9.9Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.
This class is a C# port from the original Java class GaussJordanElimination implementation by the respective authors.