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:2.0
SHA1 sum:72ad1182ac1fbaa1ea6af292c068c58a7f131cbb
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
54ff00bd3f482974d01d0f8aa73af49044ac81c540https://github.com/friguzzi/matrix.git
630b48c67ae0394b46a0aeb712f7099abb34fdd56https://github.com/friguzzi/matrix.git
7fe6565dd78c1777ab915f1e5d7a8be8ac58a03e1https://github.com/friguzzi/matrix.git
b166a0099133008b93291c7d08858d251c07716e160https://github.com/friguzzi/matrix.git
e597e1942f3cb6c3ec07cefcbf2bb56bd1902ffa11https://github.com/friguzzi/matrix.git
1.9.116b240935928b9155f6695dce693108ce35b80f12https://github.com/friguzzi/matrix.git
2.03ae0a853a7f34e06ec9907419c5fed39234c6878160https://github.com/friguzzi/matrix.git
72ad1182ac1fbaa1ea6af292c068c58a7f131cbb253https://github.com/friguzzi/matrix.git

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

Contents of pack "matrix"

Pack contains 14 files holding a total of 29.7K bytes.