File "linear"

This file provides basic numerical linear algebra operations on vectors and matrixes. Vectors are lists of numbers, and matrixes are list of vectors. The operations are realized via higher order programming using the predicates maplist/n, foldl/n, … from library(lists). The operations do not use object oriented late binding and have simple signatures.

The following linear predicates are provided:

vecdot(V, W, X):
The predicate succeeds in X with the inner product V . W.
veccross(V, W, M):
The predicate succeeds in M with the outer product V x W.
vecrand(N, V):
The predicate succeeds in V with a random vector of size N.
matapply(M, V, W):
The predicate succeeeds in W with the linear mapping M * V.
mattran(M, N):
The predicate succeeds in N with the transpose M^T.
matmul(M, N, R):
The predicate succeeds in R with the matrix multiplication M * N.
matrand(R, C, M):
The predicate succeeds in M with a random matrix of size R x C.

Kommentare