Repository for mathematical codes ( 2 variants - optimized, non-optimized )
- Overview (NON OPTIMIZED)
- Optimized Experimental (build)
- Overview (OPTIMIZED)
- Table of Contents (OPTIMIZED) still in development
- API
- Last Update
-
Fixed a bug in the
rand
function of theoptimized/lineq/matrix_methods/lowlevel/mm.c
file (file). The function was returning extremely large numbers instead of a random number within the specified range. -
Updated the docstrings in the
optimized.lineq.generator.python_interface
module. optimized.lineq.generator.python_interface -
Added new information to the
API data.json
file. API-DATA. -
Added new API functions. Check the Current Api Support for all functions.
-
New API return system -> Added in each return global_info -> request.headers, host, url, etc...
- some screenshots
Add new API functions Current Api Support Check usage instructions in API-DATA or just run run_api.py and check home page. All info in:
Started developing the API for the optimized codes. Already ready for use determinant function API. Info in data. To run the API, run run_api. Local API is available at http://127.0.0.1:8000/.
-
Use examples:
-
browser list mode
(img1)
:http://127.0.0.1:5000/det/?type=list&matrix=[[1,2,3],[4,5,6],[7,1.2,7]]
-
browser str mode
(img2)
:http://127.0.0.1:5000/det/?matrix=1%202%203\n4%205%206\n7%208%209
-
curl list mode
(img3)
:
curl `http://127.0.0.1:5000/det/?type=list&matrix=%5B%5B1%2C2%2C3%5D%2C%5B4%2C5%2C6%5D%2C%5B7%2C1.2%2C7%5D%5D`
-
Rewritted build.py script.
New Build System
- Build Management: Manages cleaning up previous builds, compiling modules, and organizing build artifacts.
- Dependency Check: Automatically checks for and installs necessary dependencies such as Cython.
- Configuration Loading: Loads build settings and module configurations from the file cfg. If the file does not exist, a default configuration is created.
- Build Result Visualization: Displays a tree structure with icons indicating the success or failure of each module.
- Automated Testing: Runs tests on successfully built libraries to ensure their correctness.
I have rewritten the Checker
module and updated matrix filling in matrix_methods
module.
-
Introduced the Checker class for matrix validation
- Methods included:
- diagonal_domination(matrix) -> bool: Checks matrix diagonal domination
- symmetric_check(matrix) -> bool: Checks matrix symmetry
- sylvesters_criterion(matrix) -> bool: Checks matrix against Sylvester's criterion
- Methods included:
-
I also updated the matrix filling in both the
matrix_methods
andChecker
modules. I replaced the cycle with a for loop and usedmemset(*, 0, sizeof(*))
to set the matrix elements to zero.
The updated Python interface for optimized.lineq.matrix_methods is now ready for use. It is optimized for 100% efficiency.
The new code is significantly faster, with an average improvement of more than 50 times.
The Generator has also been rewritten.
In the lineq/LinEq/Utils/Matrix_methods.py
file, the determinant
function has been fixed.
I have started rewriting the code. In the Optimized-Experimental
directory, you will find experimental versions of the codes with optimizations. These versions are about 50 times faster. However, you need the Cython library for this!
I have rewritten the lineq.matrix_methods
module in the optimized/lineq/matrix_methods/
directory.
Here are the links to the source code:
- The C code can be found in the code file.
- The Python code is available in the code file. This file is ready for 50% use. All functions work if imported from the
build.matrix_methods
file. However, in the Python file, only 50% of the code is implemented.
The source codes are located in the optimized/{module_name}/{util_name}/lowlevel
directory, where {module_name} represents the module name and {util_name} represents the utility name.
To build the optimized version, run the build.bat
[DELETED, use python script]
UPD 02.08.2024 build.py
file from the optimized
directory. Please note that this feature does not work with older versions of the project. Wait for a new version to be ready with all optimizations implemented.