94 if (
cur[
h] && *(
cur[
h]->entry) < *item) {
97 return cur[0] && *(
cur[0]->entry) == *item;
115 if (
cur[
h] && *(
cur[
h]->entry) < *item) {
144 item = item->
next[0];
Basic declarations, included by all source files.
Internal structure to hold the items and internal forward pointers of the skiplist.
Element(const X &item, int height)
const SkiplistIterator< X > begin() const
returns an (forward) iterator for the skiplist
const SkiplistIterator< X > end() const
returns an invalid iterator
void clear(bool killData=false)
Clears the current skiplist.
bool isElement(X item) const
Returns true if the item item is contained in the skiplist [O'(log n)].
bool empty() const
Returns true if the skiplist contains no elements.
void add(X item)
Adds the item item into the skiplist [O'(log n)].
Skiplist()
Construct an initially empty skiplist.
int size() const
Returns the current size of the skiplist, i.e., the number of elements.
Forward-Iterator for Skiplists.
SkiplistIterator(const typename Skiplist< X >::Element *e)
bool operator!=(const SkiplistIterator< X > other) const
const X & operator*() const
Returns the item to which the iterator points.
bool operator==(const SkiplistIterator< X > other) const
SkiplistIterator< X > operator++(int)
Move the iterator one item forward (prefix notation)
const Skiplist< X >::Element * el
SkiplistIterator< X > & operator++()
Move the iterator one item forward (prefix notation)
#define OGDF_NEW_DELETE
Makes the class use OGDF's memory allocator.
Declaration of memory manager for allocating small pieces of memory.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.