|
EllAlgo 1.6.13
|
A simple 2D matrix class for linear algebra operations. More...
#include <linear_algebra.hpp>
Public Member Functions | |
| Matrix2 (size_t rows, size_t cols) | |
| Construct a matrix with specified dimensions. | |
| std::vector< T > & | operator[] (size_t i) |
| const std::vector< T > & | operator[] (size_t i) const |
| size_t | rows () const |
| size_t | cols () const |
| Vector2< T > | operator* (const Vector2< T > &v) const |
A simple 2D matrix class for linear algebra operations.
This class provides basic matrix operations including matrix-vector multiplication. It is implemented using std::vector of std::vector as the underlying storage.
| T | The element type (typically float or double) |
|
inline |
Returns a reference to the vector of elements at the specified row index.
| i | The row index to access. |
|
inline |
Returns a constant reference to the vector of elements at the specified row index.
| i | The row index to access. |