Skip to content
This repository has been archived by the owner on Sep 30, 2021. It is now read-only.
/ cequsys Public archive

Solving system of linear equations with LU decomposition

License

Notifications You must be signed in to change notification settings

malczuuu/cequsys

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CEquSys

Solving system of linear equations.

Loads matrix and vector for the system of linear equation to solve from input.txt file located in working directory.

Usage instructions

  • Using CMake

    $ cmake .
    $ make
    $ ./cequsys
  • Using GCC (since it's just one file)

    $ g++ cequsys.cpp -o cequsys
    $ ./cequsys

Generate equation system with following pattern with command ./gen.py {size} > input.txt.

2 2 0 0 0 0 ; 2
2 2 2 0 0 0 ; 2
0 2 2 2 0 0 ; 2
0 0 2 2 2 0 ; 2
0 0 0 2 2 2 ; 2
0 0 0 0 2 2 ; 2

Note that it's possible to use fractions using / and without spaces between.

1/3 1/3   0   0   0   0 ; 1/3
1/3 1/3 1/3   0   0   0 ; 1/3
  0 1/3 1/3 1/3   0   0 ; 1/3
  0   0 1/3 1/3 1/3   0 ; 1/3
  0   0   0 1/3 1/3 1/3 ; 1/3
  0   0   0   0 1/3 1/3 ; 1/3

Running example from input.txt user should get following results:

1.91616;1.60141;1.44354;1.40138;1.46393;1.64751

Code style

Code should be formatted with ./format.sh script (which internally uses clang-format).

Trivia

It's a revitalized project from college at Cracow University of Technology.

About

Solving system of linear equations with LU decomposition

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published