|
Linear Equations Solver
1.0
Using Gaussian elimination
|
Core computational functions for solving linear systems. More...
#include <vector>#include <string>
Include dependency graph for methods.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Functions | |
| int | GaussianElimination (std::vector< std::vector< double > > &m, int rows, int cols) |
| Performs Gaussian elimination on the augmented matrix with partial pivoting. | |
| int | DetermineRank (const std::vector< std::vector< double > > &m, int rows, int cols) |
| Determines the rank of the coefficient matrix A (excluding augmented column). | |
| bool | BackSubstitution (const std::vector< std::vector< double > > &m, int rows, int cols, std::vector< double > &solution) |
| Performs back-substitution to find the solution vector. | |
| void | ShowGeneralSolution (const std::vector< std::vector< double > > &m, int rows, int cols, int rank) |
| Displays the general solution for systems with infinitely many solutions. | |
| std::vector< int > | IdentifyPivots (const std::vector< std::vector< double > > &m, int rows, int cols) |
| Identifies the pivot columns in the matrix. | |
Core computational functions for solving linear systems.
This header declares functions for Gaussian elimination with partial pivoting, back-substitution, rank determination, and displaying general solutions.
Definition in file methods.h.
| bool BackSubstitution | ( | const std::vector< std::vector< double > > & | m, |
| int | rows, | ||
| int | cols, | ||
| std::vector< double > & | solution ) |
Performs back-substitution to find the solution vector.
| m | The upper triangular matrix after Gaussian elimination. |
| rows | Number of rows in the matrix. |
| cols | Number of columns in the matrix (including augmented column). |
| solution | Reference to store the solution vector. |
| int DetermineRank | ( | const std::vector< std::vector< double > > & | m, |
| int | rows, | ||
| int | cols ) |
Determines the rank of the coefficient matrix A (excluding augmented column).
| m | The augmented matrix [A|b]. |
| rows | Number of rows in the matrix. |
| cols | Number of columns in the matrix (including augmented column). |
| int GaussianElimination | ( | std::vector< std::vector< double > > & | m, |
| int | rows, | ||
| int | cols ) |
Performs Gaussian elimination on the augmented matrix with partial pivoting.
| m | Reference to the augmented matrix [A|b] to be modified. |
| rows | Number of rows in the matrix. |
| cols | Number of columns in the matrix (including augmented column). |
| std::vector< int > IdentifyPivots | ( | const std::vector< std::vector< double > > & | m, |
| int | rows, | ||
| int | cols ) |
Identifies the pivot columns in the matrix.
| m | The matrix after Gaussian elimination. |
| rows | Number of rows in the matrix. |
| cols | Number of columns in the matrix (including augmented column). |
| void ShowGeneralSolution | ( | const std::vector< std::vector< double > > & | m, |
| int | rows, | ||
| int | cols, | ||
| int | rank ) |
Displays the general solution for systems with infinitely many solutions.
| m | The matrix after Gaussian elimination. |
| rows | Number of rows in the matrix. |
| cols | Number of columns in the matrix (including augmented column). |
| rank | The rank of the coefficient matrix A. |