Skip to content

The repository "Prac_Codes" on GitHub by VIA-s-acc contains various classes and methods for solving linear and non-linear equations, performing numerical integration, and addressing mathematical physics problems. It includes tools for generating and solving equations, matrix operations, polynomial manipulation, interpolation, and more.

Notifications You must be signed in to change notification settings

VIA-s-acc/Prac_Codes

Repository files navigation

PracCodes

Repository for mathematical codes ( 2 variants - optimized, non-optimized )


Last Update

Update 10.08.2024 INFO:

  • Fixed a bug in the rand function of the optimized/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.

Update #2 04.08.2024 INFO:

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:

Update 04.08.2024 INFO:

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`

Update 02.08.2024 INFO:

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.

Update 29.07.2024 INFO:

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
  • I also updated the matrix filling in both the matrix_methods and Checker modules. I replaced the cycle with a for loop and used memset(*, 0, sizeof(*)) to set the matrix elements to zero.


Update 26.07.2024 INFO:

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.


Update 26.07.2024 INFO:

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.

About

The repository "Prac_Codes" on GitHub by VIA-s-acc contains various classes and methods for solving linear and non-linear equations, performing numerical integration, and addressing mathematical physics problems. It includes tools for generating and solving equations, matrix operations, polynomial manipulation, interpolation, and more.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published