Click or drag to resize
GaussianElimination Class

The GaussianElimination data type provides methods to solve a linear system of equations Ax = B, where A is an M-by-N matrix and B is a length N vector.

This is a bare-bones implementation that uses Gaussian elimination with partial pivoting. See GaussianEliminationLite.java for a stripped-down version that assumes the matrix A is square and nonsingular. See for an alternate implementation that uses Gauss-Jordan elimination. For an industrial-strength numerical linear algebra library, see JAMA.

Inheritance Hierarchy
SystemObject
  Algs4NetGaussianElimination

Namespace: Algs4Net
Assembly: Algs4Net (in Algs4Net.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public class GaussianElimination

The GaussianElimination type exposes the following members.

Constructors
  NameDescription
Public methodGaussianElimination
Solves the linear system of equations Ax = B, where A is an M-by-N matrix and B is a length M vector.
Top
Properties
  NameDescription
Public propertyIsFeasible
Returns true if there exists a solution to the linear system of equations Ax = B.
Top
Methods
  NameDescription
Public methodStatic memberMainTest
Demo test the GaussianElimination data type.
Public methodPrimal
Returns a solution to the linear system of equations Ax = B.
Top
Remarks

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 GaussianElimination implementation by the respective authors.

See Also