C++ Reference: class DenseDoublyLinkedList

Note: This documentation is automatically generated.

Specialized doubly-linked list that initially holds [0..n-1] in an arbitrary (user-specified) and fixed order. It then supports O(1) removal and access to the next and previous element of a given (non-removed) element.

It is very fast and compact: it uses exactly 8*n bytes of memory.
Method
DenseDoublyLinkedList

Return type: explicit

Arguments: const T& sorted_elements

Next

Return type: int

Arguments: int i

Next() (resp. Prev()) must be called on elements that haven't yet been removed. They will return -1 if called on the last (resp. first) element.

Prev

Return type: int

Arguments: int i

Remove

Return type: void

Arguments: int i

You must not call Remove() twice with the same element.

Size

Return type: int