prolog::matrix_map/2

matrix_map(Pred, A)*

Apply Pred(A,Index) to every element of matrix A, where Index ranges over all entries in the array.

As an example, to transform a floating point matrix into a logs matrix:


 log(A,[X,Y]) :- V <== A[X,Y], LV is log(V), A[X,Y] <== LV.
 ?- X <== [[1.2,0.9,5],[0.1.0.2,0.3]], matrix_map(log, X), Y <== X.list().

Private-func:

1. prolog::matrix_map_2::matrix_map/2(int ARG1, int ARG2)():