Did you know ... Search Documentation:
Packs (add-ons) for SWI-Prolog

Package "matrix"

Title:Operations with matrices
Rating:Not rated. Create the first rating!
Latest version:1.0
SHA1 sum:e597e1942f3cb6c3ec07cefcbf2bb56bd1902ffa
Author:Fabrizio Riguzzi <fabrizio.riguzzi@unife.it>

Reviews

No reviews. Create the first review!.

Details by download location

VersionSHA1#DownloadsURL
1.017c2f33c578d3a8f99feac2988ae9b7c49f020681https://github.com/friguzzi/matrix.git
54ff00bd3f482974d01d0f8aa73af49044ac81c517https://github.com/friguzzi/matrix.git
630b48c67ae0394b46a0aeb712f7099abb34fdd56https://github.com/friguzzi/matrix.git
7fe6565dd78c1777ab915f1e5d7a8be8ac58a03e1https://github.com/friguzzi/matrix.git
e597e1942f3cb6c3ec07cefcbf2bb56bd1902ffa11https://github.com/friguzzi/matrix.git

matrix

SWI-Prolog pack for matrix operations. Impemented 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

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.

Contents of pack "matrix"

Pack contains 4 files holding a total of 7.3K bytes.