[PPL-devel] Hash code for PPL objects

Roberto Bagnara bagnara at cs.unipr.it
Wed Sep 14 16:01:57 CEST 2022


Hi Gianluca.

I guess you already did

$ git checkout devel
Already on 'devel'
Your branch is up to date with 'origin/devel'.
$ git grep hash_code

and you did not like what you found, correct?
Kind regards,

    Roberto

On 9/14/22 09:17, Gianluca Amato wrote:
> Hi,
> I am trying to write a function returning a 32 bit integer hash code for a PPL Semantic Geometric Descriptor. The hash function should be compatible with equality: if two PPL objects are the same according to the == operator, they must have the same hash code.
> 
> Unfortunately, I could not find anything particularly useful in the library. My current attempt is to get the string representation of the object and compute an hash value from the latter. However, this works only if equal objects always have equal string representation.
> 
> May I assume this holds, even for complex domains such as polyhedra  ? Are there better ways to get an hash code ?
> 
> Thanks in advance for any help you can provide.
> 
> --gianluca amato
> 
> 
> _______________________________________________
> PPL-devel mailing list
> PPL-devel at cs.unipr.it
> https://www.cs.unipr.it/mailman/listinfo/ppl-devel


More information about the PPL-devel mailing list