Did you know ... Search Documentation:
 Pack matrix -- prolog/matrix.pl
matrix_write(+M1)
Print elements of a matrix
matrix_mul(+M1, +M2, -M3)
Multiplication between two matrices using "cblas_dgemm" function from "cblas.h"
matrix_dims(+M1, -Dimension)
Calculates the total number of elements in the matrix. The value is contained in Dimension.
matrix_size(+M1, -Nelements)
Calculates the number of elements in the matrix. We have to pass the number of the rows and the number of the column.
matrix_type(+M1, -Type)
Function that return the Type of the matrix passed.
matrix_to_list(+M1, -List)
Function that transforms the matrix passed in input in a list.
matrix_map(+Predicate, +M1, -M2)
Function that return true if Predicate can successfully be applied on all elements of M1.
matrix_foreach(+M1, +Predicate)
For each element E of M1, enumerated by rows, calls Predicate(+E,-F) and replaces E with F.
matrix_set_all(+Number, +M1)
matrix_set_all set all element of the matrix to Element.
matrix_max(+M1, -Max)
`matrix_max(M,Max)` unify Max with the maximum element of the matrix M.
matrix_min(+M1, -Min)
`matrix_min(M,Min)` unify Min with the minimum element of the matrix M.
matrix_sum(+M1, -Sum)
`matrix_sum(M,Sum)` unify Sum with the sum of the elements in M.
matrix_transpose(+M1, -M2)
`matrix_transpose(M1,M2)` transpose matrix M1 to M2.
matrix_maxarg(+M1, -MaxPosition)
`matrix_maxarg(M,[NRowMax, NColumnMax])` unify [NRowsMax, NColumnMax] with the position of the maximum in matrix M.
matrix_minarg(+M1, -MinPosition)
`matrix_minarg(M,[NRowMax, NColumnMax])` unify [NRowsMax, NColumnMax] with the position of the minimum in matrix M.
matrix_agg_lines(+M1, +AggregationMatrix)
matrix_agg_lines (M,AggregationMatrix) sum all the elements of every row of M and the new value will be insert in the AggregationMatrix.
matrix_agg_cols(+M1, +AggregationMatrix)
matrix_agg_cols (M,AggregationMatrix) sum all the elements of every column of M and the new value will be insert in the AggregationMatrix.
matrix_op(+M1, +M2, +Operator, -M3)
`matrix_op(M1,M2,Op,M3)` apply Op an operator entered in input (+,-,*,/) element by element of matrix M1 and M2 and the result will be insert in M3.
matrix_op_to_all(+M1, +Operator, +Operand, -M2)
`matrix_op_to_all(M1,Operator,Operand,M2)` apply Operator (+,-,*,/) and Operand (an integer, a float...) element by element at matrix M1 and the result will be insert in M2. Example: input (+3) sum 3 to each elements of M1.
matrix_select(+M1, +Number, +List, +Result)
`matrix_select(M1,Number,List,Result)` select from M1 a list of rows or columns (to select rows Number will be 1, to select columns Number will be 2) and these will be copied in Result.
matrix_createZeroes(+Type, +Dimension, -M1)
`matrix_createZeroes(M1)` create a new matrix with all elements set to 0.
Read from keyboard values and these will be insert in M1.
matrixSetZeroes(+NRows, +NColumns, +Elements)
matrixSetZeroes sets to 0 all its argument matrix's elements.
matrixSetOnes(+NRows, +NColumns, +Elements)
`matrixSetOnes(M1)` create a new matrix with all elements set to 1.
matrix_setAllNumbers(+NRows, +NColumns, +Elements)
matrix_setAll sets to Number given in input all the matrix's elements.
matrix_eye(+NRows, +NColumns, +Elements)
matrix_eye create a identity matrix
matrix_equal(+M1, +M2)
`matrix_equal(M1,M2)` compares two matrix (M1 and M2).
matrix_from_list(+List, +M1)
`matrix_from_list(List,M1)` sect the elements of the matrix M1 with new element passed in a List.

## Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

matrix_new(Arg1, Arg2, Arg3)
matrix_new(Arg1, Arg2, Arg3, Arg4)
matrix_get(Arg1, Arg2, Arg3)
matrix_set(Arg1, Arg2, Arg3)