[PPL-devel] Hash code for PPL objects

Gianluca Amato gianluca.amato at unich.it
Wed Sep 14 09:17:46 CEST 2022


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cs.unipr.it/pipermail/ppl-devel/attachments/20220914/e2295417/attachment.htm>


More information about the PPL-devel mailing list