Matrix0 class
#include <ellalgo/conjugate_gradient.hpp>
A simple matrix class for conjugate gradient calculations.
This class provides basic matrix operations needed for the conjugate gradient method, including matrix-vector multiplication.
Constructors, destructors, conversion operators
Public functions
-
auto operator[](size_
t i) -> std::vector<double>& - Access row i of the matrix.
-
auto operator[](size_
t i) const -> const std::vector<double>& - Access row i of the matrix (const version)
-
auto rows() const -> size_
t - Get the number of rows.
-
auto cols() const -> size_
t - Get the number of columns.
- auto dot(const Vector0& v) const -> Vector0
- Multiply the matrix by a vector.
Function documentation
std::vector<double>& Matrix0:: operator[](size_ t i)
Access row i of the matrix.
| Parameters | |
|---|---|
| i in | Row index |
| Returns | Reference to the row vector |
const std::vector<double>& Matrix0:: operator[](size_ t i) const
Access row i of the matrix (const version)
| Parameters | |
|---|---|
| i in | Row index |
| Returns | Const reference to the row vector |