Re: Why can't or shouldn't I just hash the address of an object? And how.

2018-12-29 Thread Neia Neutuladh via Digitalmars-d-learn
On Sun, 30 Dec 2018 05:36:41 +, Enjoys Math wrote: > Is it: > > typeof(T).getHash()? This gets the hashcode for the object by calling toHash() on it. > Or does that do something other than just get the address? It XORs the address with a bitwise rotation of the address. This reduces

Why can't or shouldn't I just hash the address of an object? And how.

2018-12-29 Thread Enjoys Math via Digitalmars-d-learn
I am creating a custom graph database for our app. It holds not one huge graph but a collection of independent graphs. I would like to be able to delete them without looping through a range of billions of Graph class references. How can I accomplish this with an AA and hasing? Is it: