https://github.com/friguzzi/matrix
Operations with matrices, SWI pack
https://github.com/friguzzi/matrix
Last synced: 7 months ago
JSON representation
Operations with matrices, SWI pack
- Host: GitHub
- URL: https://github.com/friguzzi/matrix
- Owner: friguzzi
- Created: 2016-08-11T19:48:41.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2023-12-11T07:47:56.000Z (over 2 years ago)
- Last Synced: 2024-02-15T07:34:19.028Z (over 2 years ago)
- Language: Prolog
- Homepage:
- Size: 47.9 KB
- Stars: 9
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-prolog - matrix - Matrix operations. (Math)
README
# matrix
SWI-Prolog pack for matrix operations.
Implemented operations:
- sum
- difference
- multiplication
- Cholesky decomposition https://en.wikipedia.org/wiki/Cholesky_decomposition
- determinant for positive semi-definite matrices (using Cholesky decomposition)
- inversion for positive semi-definite matrices (using Cholesky decomposition)
- inversion for lower triangular matrices
- identity matrix
- diagonal matrix
The library was developed for dealing with multivariate Gaussian distributions,
that's the reason for the focus on positive semi-definite matrices
Example of use
---------------
$ swipl
?- use_module(library(matrix)).
?- determinant([[2,-1,0],[-1,2,-1],[0,-1,2]],D).
D = 3.999999999999999.
## Documentation
https://friguzzi.github.io/matrix