Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mitya57/jordan-system
A program to solve linear systems using the Gauss–Jordan method.
https://github.com/mitya57/jordan-system
Last synced: 21 days ago
JSON representation
A program to solve linear systems using the Gauss–Jordan method.
- Host: GitHub
- URL: https://github.com/mitya57/jordan-system
- Owner: mitya57
- Created: 2012-10-27T12:47:12.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-03-27T14:40:37.000Z (over 10 years ago)
- Last Synced: 2024-10-13T17:05:39.713Z (24 days ago)
- Language: C++
- Size: 199 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.mkd
Awesome Lists containing this project
README
This program is able to solve linear systems using the Jordan method.
## Usage
### Reading matrix from the file
matrix MatrixSize BlockSize FileName
will read the matrix from file `FileName`, which should have the following format:
N
Element00 Element01 ... Element0N RightColumn0
Element10 Element11 ... Element1N RightColumn1
. . . . .
ElementN0 ElementN1 ... ElementNN RightColumnN### Automatically generating the matrix
matrix MatrixSize BlockSize
will automatically generate the matrix using a formula given in `function.hh` file.
### Compiling
To reach the maximum performance, we recommend using the [profile-guided optimization][1].
First you need to generate the profile. To do that, run:g++ -O3 -lpthread -fprofile-generate matrix.cc -o matrix
Then run the `matrix` executable as described below and wait for the profile to be generated.
After that is done, run:g++ -O3 -lpthread -fprofile-use matrix.cc -o matrix
Now your program will be optimized based on its profile. You can also use `make` targets
(`make pg` and `make pu`, respectively).[1]: https://en.wikipedia.org/wiki/Profile-guided_optimization
## Running the tests
To ensure that the functions work well, a test program `matrix_tests.cc` is included.