Re: [Rd] dict package: dictionary data structure for R

2007-07-24 Thread Martin Maechler
> "HenrikB" == Henrik Bengtsson <[EMAIL PROTECTED]> > on Tue, 24 Jul 2007 18:58:04 +0200 writes: HenrikB> On 7/23/07, Seth Falcon <[EMAIL PROTECTED]> wrote: >> Bill Dunlap <[EMAIL PROTECTED]> writes: >> > With environments, if you use a prime number for the size >> > yo

Re: [Rd] dict package: dictionary data structure for R

2007-07-24 Thread Henrik Bengtsson
On 7/23/07, Seth Falcon <[EMAIL PROTECTED]> wrote: > Bill Dunlap <[EMAIL PROTECTED]> writes: > > With environments, if you use a prime number for the size > > you get considerably better results. E.g., > > > Perhaps new.env() should push the requested size up > > to the next prime by default. > >

Re: [Rd] dict package: dictionary data structure for R

2007-07-23 Thread Seth Falcon
Bill Dunlap <[EMAIL PROTECTED]> writes: > With environments, if you use a prime number for the size > you get considerably better results. E.g., > Perhaps new.env() should push the requested size up > to the next prime by default. Perhaps. I think we should also investigate other hashing functi

Re: [Rd] dict package: dictionary data structure for R

2007-07-23 Thread Seth Falcon
Duncan Temple Lang <[EMAIL PROTECTED]> writes: > The HashFunc typedef in hashfuncs.h would be more flexible if it > took an additional argument of type void * to allow for user > defined data. Alternatively, it might take the hash table > object itself. The function might want to do some > updat

Re: [Rd] dict package: dictionary data structure for R

2007-07-23 Thread Duncan Temple Lang
Hi Seth. Glad you did this. As you know, I think we need more specialized data structures and the ability to be able to introduce them easily into R computations, both internally and at the R language-level. A few things that come to mind after a quick initial look. The HashFunc typedef in hashf

Re: [Rd] dict package: dictionary data structure for R

2007-07-22 Thread Bill Dunlap
On Sat, 21 Jul 2007, Seth Falcon wrote: > In Bioconductor, we have many hashtables where the key is an > Affymetrix probeset ID. These look sort of like "1000_at". It turns > out that the algorithm used by R's environments is not very good at > hashing these values. The dict package lets you in

Re: [Rd] dict package: dictionary data structure for R

2007-07-21 Thread Seth Falcon
"Gabor Grothendieck" <[EMAIL PROTECTED]> writes: > Although the proto package is not particularly aimed at hashing note > that it covers some of the same ground and also is based on a well > thought out object model (known as object-based programming > or prototype programming). Interesting. The

Re: [Rd] dict package: dictionary data structure for R

2007-07-21 Thread Gabor Grothendieck
Although the proto package is not particularly aimed at hashing note that it covers some of the same ground and also is based on a well thought out object model (known as object-based programming or prototype programming). Here is an example where we create two proto objects (which could be regard

[Rd] dict package: dictionary data structure for R

2007-07-21 Thread Seth Falcon
Hi all, The dict package provides a dictionary (hashtable) data structure much like R's built-in environment objects, but with the following differences: - The Dict class can be subclassed. - Four different hashing functions are implemented and the user can specify which to use when crea