Hashing "object identities"

Jason Cornez jcornez at alum.mit.edu
Sun Dec 3 12:53:09 UTC 2017


If you *need* object identity, then CLOS objects give you that with hashing (as I am sure you know).  But a slot in the struct containing a unique integer (or a gensym if you prefer) can also give you identity.  I think I am perhaps not understanding exactly what you want.

-Jason

> On 3 Dec 2017, at 12:38, Antoniotti Marco <antoniotti.marco at disco.unimib.it> wrote:
> 
> 
>> On Dec 3, 2017, at 12:27 , Jason Cornez <jcornez at alum.mit.edu> wrote:
>> 
>> Add an integer slot on the structs; hash on that?  -Jason 
> 
> I forgot to mention it.  THAT is another thing I want to avoid because I need to share subgraphs (DAGs).  I need to hash on the “object identity”.
> 
> Cheers
>> MA
> 
> 
> 
> 
> 
> 
>> 
>> Sent from my iPhone
>> 
>>> On 3 Dec 2017, at 12:02, Antoniotti Marco <antoniotti.marco at disco.unimib.it> wrote:
>>> 
>>> Hi
>>> 
>>> I am fooling around with a problem that eventually will have to use a hash table on “triples” of “integers” and “structures".  Triples I can portably pass to the EQUAL hash table.  I cannot use an EQUALP hash table, because I would end up wasting to much time.
>>> 
>>> Here is the rub:  my triples <N, O1, O2> need to use the “object identity” of O1 and O2 (two structs).  I could switch to an EQL hash table keyed on (HASH-TRIPLE-KEY N O1 O2).  How would you proceed (or write HASH-TRIPLE), while staying as much portable as possible?  As you well know SXHASH is practically useless.
>>> 
>>> Thanks
>>>>>> Marco
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> --
>>> Marco Antoniotti, Associate Professor        tel.    +39 - 02 64 48 79 01
>>> DISCo, Università Milano Bicocca U14 2043        http://bimib.disco.unimib.it
>>> Viale Sarca 336
>>> I-20126 Milan (MI) ITALY
>>> 
>>> Please check: http://cdac2018.lakecomoschool.org
>>> Please check: http://troncopackage.org
>>> 
>>> Please note that I am not checking my Spam-box anymore.
>>> Please do not forward this email without asking me first (cum grano salis).
>>> 
>>> 
>>> 
>>> 
>>> 
>> 
>> 
> 
> --
> Marco Antoniotti, Associate Professor		tel.	+39 - 02 64 48 79 01
> DISCo, Università Milano Bicocca U14 2043		http://bimib.disco.unimib.it
> Viale Sarca 336
> I-20126 Milan (MI) ITALY
> 
> Please check: http://cdac2018.lakecomoschool.org
> Please check: http://troncopackage.org
> 
> Please note that I am not checking my Spam-box anymore.
> Please do not forward this email without asking me first (cum grano salis).
> 
> 
> 
> 
> 




More information about the pro mailing list