DList access the previous element

Tobi G. via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jan 1 05:08:29 PST 2016


I'd like to implement a Skyline Rectangle packing algorithm.
A DList should store the actual Skyline. (So the order is 
important, it will mostly have to access the right or left node 
element)
And a Binary Heap which should hold a pointer to every DList 
element.
(Mostly for fast accessing the smallest element)

The problem is that there is no node access for DList, only a 
bidirectional range access.
So in a doubly linked list there is no way to access the previous 
element?
How can i get this work without rewriting a DList?

togrue








More information about the Digitalmars-d-learn mailing list