Hi everybody
I am new in this forum and resuming the programming with SWI-Prolog after many years …
I am developing an application with small animation over the output in the screen. However, this data structure is a list of lists, such:
[
[+,-,+,-,-,-,+,-,-,-,+,-,-,-,+,-,-,-,+]
[|, ,|, , , ,|, , , ,|, , , ,|, , , ,|]
[|, , , ,|, , , ,|, , , ,|, , , ,|, ,|]
[+,-,-,-,+,-,-,-,+,-,-,-,+,-,-,-,+,-,+]
]
in the blank spaces I need to create some edges, meaning, for instance,
point 2 is connect 3 and so on.
This task should be tremendous facilitated if this structure had been a matrix (2D).
Once that each edges can be in horizontal or vertical alignment.
Searching for a module or predicate to do it, I found the matrix.pl
https://www.swi-prolog.org/pack/file_details/matrix/prolog/matrix.pl?show=src
with all most predicates for matrix manipulation.
So I tried to install such package, using:
?- pack_install(matrix).
% Contacting server at XXXX://www.swi-prolog.org/pack/query …
ERROR: url `‘XXX://www.swi-prolog.org/pack/query’’ does not exist (status(500,Internal Server Error))
ERROR: In:
ERROR: [18] throw(error(existence_error(url,‘XXX://www.swi-prolog.org/pack/query’),context(_1360,…)))
…
effectively the
:- module(matrix,
[ matrix_write/1, …
brings all the predicates for matrices.
Well, someone could some details on this module?
How to use? Where is the latest version of this module?
How to install? an example?
Effectively in this case, the matrix uses should be very appropriate …
Thanks in advance
I’m using: SWI-Prolog version ???
Welcome to SWI-Prolog (threaded, 64 bits, version 8.0.1)
I want the code to:
wishing to use matrix instead of lists
But what I’m getting is:
I can’t install this module
My code looks like this:
reported above
% your code here