Is the PHP heap implementation really a full version?
When I read this article, http://en.wikipedia.org/wiki/Heap_%28data_structure%29 , I realized that the child node has a specific parent, and that the parent has specific children.
However, when I look at an example in the PHP documentation, http://au.php.net/manual/en/class.splheap.php , it seems that the child nodes are at the same level, but the specific parent / child information is not is important.
For example, which node is the parent for each of the three nodes, which takes 10th place in the PHP example?
In my application, when the user selects "node 156", I need to know who his children are, so that I can pay for them every visit. (I could make them the identifiers node 1561 ',' node 1562 ', etc., so the relationship is obvious).
Is the PHP heap implementation incomplete? Should I forget the Spl class and go my own way? Or am I missing something about how heaps should work? Or maybe I should look at a specific heap option?
Thanks heaps!
source share