Skip to content

Commit

Permalink
Small documentation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aslze committed Dec 3, 2024
1 parent 869428a commit 80ba0f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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__:
Expand Down
6 changes: 5 additions & 1 deletion include/asl/Matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -95,6 +96,9 @@ class Matrix_ : public Array2<T>
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]; }
Expand Down

0 comments on commit 80ba0f1

Please sign in to comment.