Bill Allombert on Fri, 13 Mar 2015 20:28:04 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: PARI Map object


Dear PARI developers,

Joerg Arndt was kind enough to fix a number of spelling issues in my
previous post. Here the corrected version:

- - - - - -

We have added support for associative arrays ("maps") to PARI.
This work this way:

M=Map() creates an empty map.
mapput(M,x,y) adds a new binding x->y to the map
mapget(M,x) retrieves the value associated to x.
mapdelete(M,x) removes x from the domain of M.

maps can be converted to matrices with Mat and conversely
matrices with two columns can be converted to maps with Map.
Vec can be also used to retrieve the domain of the map.

Cheers,
Bill