From 80ba0f160b1e89d25941c69100934984ba232630 Mon Sep 17 00:00:00 2001 From: Alvaro Date: Tue, 3 Dec 2024 22:05:58 +0100 Subject: [PATCH] Small documentation fix --- README.md | 2 +- include/asl/Matrix.h | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1bbf6f9..21db317 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ __Utilities__: - Binary buffer reading/writing (endian-aware) - Random number and UUID generators - Elapsed time measurement -- Linear and nonlinear systems solving +- Linear and nonlinear equations systems solving - Basic testing functionality __Basic data types__: diff --git a/include/asl/Matrix.h b/include/asl/Matrix.h index f4e04bc..f2088ab 100644 --- a/include/asl/Matrix.h +++ b/include/asl/Matrix.h @@ -9,7 +9,8 @@ namespace asl { /** - * A matrix supporting basic arithmetic operations. With two predefined specializations: `Matrix` for doubles and `Matrixf` for floats. + * A matrix supporting basic arithmetic operations. With two predefined specializations: + * `Matrix` for float and `Matrixd` for double. * * ~~~ * Matrix A = { // this makes a 2x2 matrix @@ -95,6 +96,9 @@ class Matrix_ : public Array2 return *this; } + /** + * Returns the i-th element in memory: useful to treat column or row matrices as vectors + */ T& operator[](int i) { return this->_a[i]; } const T& operator[](int i) const { return this->_a[i]; }