C++ Programming GalleryMath and others

Matrix Numerical Methods for Solving Systems of Linear Equations in C++

A system of equations is solved using the following algorithms in numerical methods, coded in C++ language:

  • Gauss method – LU decomposition
  • Gauss Method – Maximum Pivot
  • Cholesky method
  • Gauss-Seidel method

Developed by:

JOSE LUIS DE LA CRUZ LAZARO

YACSHA – Software & Desing, since 1999, Lima – Perú
The World of Chaos – EL MUNDO DEL CAOS – Unlimited Programming

You can DOWNLOAD the SOURCE CODE and executable software for FREE from here:

Join The World of Chaos Developer Community😃

Contribute to the project on Github!

HISTORY

  • Version 2 – 02-IV-2024
    • Code is updated and improved
    • Comments are translated from Spanish to English
    • std::vector is used instead of arrays, and in this way the limitation that did not allow solving systems of equations with more than 10 unknown variables is eliminated.
    • Improvements in the coding of the Gauss Seidel and Cholesky algorithms.
    • Finished replacing all arrays with std:vector
    • An alert message is added informing when the Cholesky method cannot be applied
    • The code is modernized, converting it into the CMatrixSolvingLinearEq class
    • Traces of old C functions, such as printf, cprintf, fabs, etc… are removed and replaced with their modern equivalents
    • Some missing comments and the names of the CMatrixSolvingLinearEq methods are translated into English.
    • Unnecessary files are removed
    • The option is added to generate the elements of matrices A and B randomly, only defining the order of the matrix and indicating whether it will be diagonally dominant. If you create a diagonally dominant matrix, it can be successfully processed.
    • Modifications are added to the History version
    • The roots are shown in the Gauss-Seidel method as long as this method converges.
    • In the Cholesky method, information messages are added about whether the method converges or does not converge.
    • The user is asked whether or not he wants to display the LU matrices, because for a large dimension of A, the display process is slow.
    • A chronometer is added to measure the time that each method takes, and the seconds that each method has taken to process the solution are shown, in order to obtain a point of comparison between the efficiency of the algorithms.
  • Version 1 – 30-XI-1999
    • First version for Borland C++ 3.1 and Turbo C 3.0

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button