This library is implemented by referring to glMatrix
If you are a geek and you want to pursue extreme performance, then this library may not be suitable for you. Maybe you need GSL, BLAS/LAPACK.
If you are a beginner and are learning graphics related knowledge like matrix. Then this library may help you. Because the function implementation of this library is simple and easy to understand, and there will be a relatively complete derivation process for all functions.
We use cmake to build project. Please make sure you have cmake installed on your computer.
Run the following shell to compile:
bash cbuild.sh
And the product is produced in lib/ folder.
lib
├── libfq_matrix.a
└── libfq_matrix.dylib
We use CuTest to manage/execute test cases, which is a Small and Easy to Deploy unit testing library.
Run the following shell to start unit test:
bash ctest.sh
Welcome to contribute for any features/docs/bugs. when you contribute your code, you need to add and execute complete test cases. Here are some instructions for how to add unit test cases:
-
Test files correspond to source files one by one. For example, if there is a source file named fq_matrix.c in the
src/
folder, then there must be a corresponding test file named test_fq_matrix.c in thetest/
folder. -
Test functions are named in the format of test_XXX_base or test_XXX_edge. For example, test_create_base is a test case for the function create.
-
If you find a new test case, you need create a new function in the form of test_XXX_YYY. For example, test_create_withzero is a test case for the function create in fq_matrix.c with fill = 0.0.
-
Finally, you need to add new test cases to the suite. such as:
SUITE_ADD_TEST(suite, test_create_withzero);
You can refer to the test cases in test/test_fq_matrix.c for details.
- 2024-08-04 init project