Gaussian Matrix Solver
This is my most recent C++ work, the Gaussian-Elimination Matrix Solver.
Because this program does some very complicated pointer tricks (treating a
2-dimensional array as a vector), it is only available in C format.
The Gaussian algorithm I used is the same method that Mr. Hornbein's teaching in
Foundations at the moment (2/1/99), only a tad bit simpler. Here's how it (and
most other calculators) works:
- First, it reduces the top row so that the first number is 1. Computers have
no problems with fractions; humans do.
- Then, it transforms the lower rows so that their rows are 0. It then
proceeds with the second row/column, until it transforms the matrix into echelon
form.
- Finally, it performs back-substitution to extract the solution from the
echelon matrix.
Because this program is C++ and not Java based, you can't really do much with it
from your browser, or even with a Java runtime. If you're so lucky as to have a
C++ compiler, just run it on the source file. If you have an account on thibs,
then just run ~bean/public_html/gauss/gauss
.
Download a ZIP with all the files.