The first project in my C++ Repo.
Hope not the last :)
Simple Linear Algebra lib to work with numeric vectors, matrices, systems of equations and so on
Project's aim — • repeat some linear algebra topics, • code them, • try practicing (modern) C++, • start using tests (
Google tests) and • CMake, • maybe even GitHub Actions. Here for the first time using CMake myself and Gtests
cd Testercmake -S . -B build -G "MinGW Makefiles"// or your generatorcmake --build buildcd build && ctest- In JetBrains Clion it is possible to choose main
CMakeLists.txt(so it's necessary to choose one fromTesterfolder) — and it will be possible to run tests automatically byctrl + F5orRunbutton. Also it will be necessary to chooseAll CTest | Debugin select of configuration
cd Librarycmake . -B build -G "MinGW Makefiles"// or your generatorcmake --build build
- Vector class
- Template
- Copy constructor and = operator
- Operators
- Ostream operator
- Norm
- Normalization
- × Convert / Transform (with lambda as argument)
- Sum
- Friend class for Matrix class
- Cast to Matrix
- Matrix class (can also represent Vector)
- Operators (via already realized Vector's ones)
- Ostream operator
- Multiplication // native
- Pow
- Determinant
- Transposing
- Triangulation (Gauss-method, Upper)
- Identity (Unit) matrix
- Extracting submatrix for minor
- Minor
- Cofactor
- Is symmetric
- Track (Spur)
- Rank
- × Norm (?)
- Inverse matrix
- Cast to Vector (if 1 row)
- Equations systems solvers class
- Gauss
- × Jacobi
- × Simple iterations // COMING SOON
- × Zeidel // COMING SOON
- Cramer
- By inverse matrix
- CMake
- Tests:
- × Connect to
CodeCov - Test with
Google tests(gtest CMake tutorial) - Or at least start testing with
assert.h(cassert) - × Bage with tests in Readme.md
- × Connect to
- GitHub Actions (— for what ? — don't know yet, but may be useful) // just running gtest on server
- Modern C++ 17 features, which are new for me
- Initialization with curly brackets with auto type
- Automatic output of the received template class type, example: Vector(5, 6) => Vector(5, 6)
- Unpacking structures ?
- Limiting the scope of variables in if, for, switch ?
- constexpr-if ?
- Template classes
- Google C++ code style (style guide)
- Modern features: STD functions, auto lambda expressions, constexpr and so on
- Google Tests, hundreds of code-lines with tests
- CMake-s for tests and for building a lib