Re: [jgrapht-users] Bizarre issue with TopologicalOrderIterator
Brought to you by:
barak_naveh,
perfecthash
From: <org...@io...> - 2014-12-04 14:53:55
|
> On 2014-12-04T14:02:52 +0100 > Alexander Herz <ale...@my...> wrote: > > That is java for you, > data structures using hashes often use the value of references to > compute the hash. Since the pointer values may change every run, the > order things are iterated over may change every run (there is no > guarantee that the n-th call to malloc in an application always yields > the same address). > In order to make your application deterministic and debugable you want > to use LinkedHash.. data structures. These guarantee deterministic > behaviour (in single threaded execution). Is this the case with the TopologicalOrderIterator (or the DirectAcyclicGraph)? I only use structural equality and hashes derived from values, as opposed to reference equality or Object.hashCode() in my own code. M |