Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Readme.md

Simple Linear Algebra Library

Educational purposes

Description:

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

To Run tests:

  1. cd Tester
  2. cmake -S . -B build -G "MinGW Makefiles" // or your generator
  3. cmake --build build
  4. cd build && ctest
  5. In JetBrains Clion it is possible to choose main CMakeLists.txt (so it's necessary to choose one from Tester folder) — and it will be possible to run tests automatically by ctrl + F5 or Run button. Also it will be necessary to choose All CTest | Debug in select of configuration

To build a static library:

  1. cd Library
  2. cmake . -B build -G "MinGW Makefiles" // or your generator
  3. cmake --build build

Functionality / To Do:

  • 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
  • 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 ?

Some more features:

  • 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

 

© 2022 | All Rights Reserved