Skip to content
Operations with matrices, SWI pack
Prolog
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
prolog
README.md
pack.pl

README.md

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.
You can’t perform that action at this time.