|
QGIS API Documentation 4.3.0-Master (90cb4ecf9ef)
|
Contains utility functions for solving matrix operations. More...
#include <qgsmatrixsolver.h>
Classes | |
| struct | GslData |
Public Member Functions | |
| QgsMatrixSolver (const QgsMatrixSolver &)=delete | |
| QgsMatrixSolver (int maximumDimension) | |
| Constructor for QgsMatrixSolver, pre-allocated to solve matrices with the specified maximumDimension. | |
| ~QgsMatrixSolver () | |
| int | maximumDimension () const |
| Returns the maximum dimension supported by this solver. | |
| QgsMatrixSolver & | operator= (const QgsMatrixSolver &)=delete |
| void | setRightHandSide (int row, double value) |
| Sets a value in the preallocated right-hand-side vector b. | |
| void | setValue (int row, int column, double value) |
| Sets the value for row, column in the preallocated matrix A. | |
| bool | solve (int dimension, QVector< double > &result, Qgis::LinearMatrixMethod method=Qgis::LinearMatrixMethod::Lu) |
| Solves the system Ax = b for a specific active dimension. | |
Static Public Member Functions | |
| static bool | isAvailable () |
Returns true if the matrix solver functionality is available on the current system. | |
Contains utility functions for solving matrix operations.
This utility class is designed to solve systems of linear equations in the form Ax = b using LU decomposition.
Definition at line 44 of file qgsmatrixsolver.h.
|
explicit |
Constructor for QgsMatrixSolver, pre-allocated to solve matrices with the specified maximumDimension.
| maximumDimension | The dimension N for the largest N × N matrix A to solve with this object. (E.g. 4 if a 4 × 4 matrix is the largest A to solve.) |
Definition at line 65 of file qgsmatrixsolver.cpp.
| QgsMatrixSolver::~QgsMatrixSolver | ( | ) |
Definition at line 97 of file qgsmatrixsolver.cpp.
|
delete |
|
static |
Returns true if the matrix solver functionality is available on the current system.
Definition at line 56 of file qgsmatrixsolver.cpp.
| int QgsMatrixSolver::maximumDimension | ( | ) | const |
Returns the maximum dimension supported by this solver.
Definition at line 139 of file qgsmatrixsolver.cpp.
|
delete |
| void QgsMatrixSolver::setRightHandSide | ( | int | row, |
| double | value ) |
Sets a value in the preallocated right-hand-side vector b.
| row | The row index (0-based) |
| value | The value to insert |
| QgsNotSupportedException | for QGIS builds without GSL support. |
Definition at line 156 of file qgsmatrixsolver.cpp.
| void QgsMatrixSolver::setValue | ( | int | row, |
| int | column, | ||
| double | value ) |
Sets the value for row, column in the preallocated matrix A.
| row | The row index (0-based) |
| column | The column index (0-based) |
| value | The value to insert |
| QgsNotSupportedException | for QGIS builds without GSL support. |
Definition at line 144 of file qgsmatrixsolver.cpp.
| bool QgsMatrixSolver::solve | ( | int | dimension, |
| QVector< double > & | result, | ||
| Qgis::LinearMatrixMethod | method = Qgis::LinearMatrixMethod::Lu ) |
Solves the system Ax = b for a specific active dimension.
| dimension | The dimension N for the N × N sub-matrix to solve. |
| result | Solution vector x |
| method | Solving strategy to use |
true on success, false if the matrix is singular and could not be solved.| QgsNotSupportedException | for QGIS builds without GSL support. |
| QgsInvalidArgumentException | for invalid dimension values |
Definition at line 167 of file qgsmatrixsolver.cpp.