SIDEMADE - Simple Dense Matrix Decomposition

A simple demo code to read dense matrices from files and solve linear systems with them.

Folder Structure

  • cmake: Third-party CMake modules
  • CMakeLists.txt: CMake configuration file
  • data: Various dense matrices
  • LICENSE: MIT license file
  • src: Source code
    • Configuration.hpp/cpp: A yaml configuration reader
    • MatrixSolver.hpp/cpp: A convenience hull to solve dense matrix system by matrix decompositions
    • matrixIO.hpp/cpp: IO methods to read Eigen matrices from or write them to csv files
    • main.cpp: Main file
  • tests: Unit tests

Building

You can build the code using CMake:

$ mkdir build
$ cd build
$ cmake ..
$ make -j

Dependencies

  • A C++ compiler supporting at least C++11
  • CMake: At least version 3.12
  • Eigen: At least version 3.2
  • yaml-cpp: At least version 0.6

For unit testing moreover:

Running

You need to call the code with a configuration file, e.g. config.yml. If you call the program from the build folder:

$ ./sidemade ../data/config.yml

Configuration

An example configuration file:

DecompositionType: QR
MatrixFileName: ../data/m250.csv
MatrixSize: 250

Tools

Formatting

You can format the code base using clang-format:

$ clang-format -i src/*