Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xlucn/myrecipes
algrithoms for numerical computation 数值算法
https://github.com/xlucn/myrecipes
algorithm computation numerical recipes
Last synced: 14 days ago
JSON representation
algrithoms for numerical computation 数值算法
- Host: GitHub
- URL: https://github.com/xlucn/myrecipes
- Owner: xlucn
- Created: 2016-02-09T05:23:09.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2021-03-13T04:59:55.000Z (over 3 years ago)
- Last Synced: 2024-10-17T08:15:31.677Z (30 days ago)
- Topics: algorithm, computation, numerical, recipes
- Language: C
- Homepage: https://oliverlew.github.io/MyRecipes
- Size: 938 KB
- Stars: 3
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Algorithms for numerical computation.
Just an exercise implementing the algorithms from 《数值计算方法》,林成森,科学出版社, do not guarantee the programs run perfectly.
## Requirements:
- make
- gcc(>= c99)
- sed(for makefile dependencies)
- python## Project structure
```
Myrecipes
|-- include: header files
|-- test: test files
| |-- Test.c
| |-- Test.h
| |-- GenerateTest.py
| +-- test*.c
|-- [A-Z]*: source files
|-- (created) debug: intermediate files
+-- (created) lib: static library files
```## How test files are compiled
- Test files follows the pattern in order to automatically parse and generate a test header file:
- All the test functions are written in `test*.c` files.
- Every test function must return `int` type, have no argumemts and be named as `test*`.- `GenerateTest.py` is a python script that scans through `test*.c` files,
looks for functions that meet the conditions mentioned above and generate a
header file `Test.h` which contains declarations, (macro)list of function
variables, (macro)list of function names and (macro)the number of all the test
functions.- `Test.c` is a short C file that includes `Test.h`, uses the macros in it
to call every test function and print the summary infomation of the test.To show the flow in a chart:
```
GenerateTest.py
test*.c -----------------> Test.h \
|---> test binary
Test.c /
```