Bill Allombert on Thu, 18 Oct 2012 09:13:17 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: PARI/GP collectiond |
On Wed, Oct 17, 2012 at 11:36:25PM -0400, Mathieu Carbou wrote: > Hello again, > > I didn't found these types in PARI/GP... Are they implemented or I must > fo by myslelf ? > > (1) a HashMap ? (unordered map of unique key with put, get and size methods) Only in libpari. > (2) a TreeMap ? (ordered map of unique key with put, get and size methods) > (3) in map or lists, contains() method > (4) in ordered lists, a binary search method returns either the element > index found (positive) or the insertion point (negative) 4) is available in GP using listsort and setsearch. The issue with all theses data structures in GP is memory handling. GP does not have a garbage collector which is able to deal with local memory allocation. Cheers, Bill.