[Click] Re: DEQueue data structure

Eddie Kohler kohler at icir.org
Mon Jul 7 21:58:52 EDT 2003


> I just added a new double ended queue data structure to click.  It's
> called DEQueue, and it's based on the Vector code.  The advantage over
> Vector is that DEQueue lets you push/pop on the front in constant
> time, as well as push/pop on the back like Vector.  The main
> disadvantage is that the iterators are more complex (because they have
> to handle wraparound in the underlying array), and perhaps some
> operations have an extra bit of book-keeping (two indices [head, tail]
> in addition to the size value).  I have done some testing and it seems
> to work for me so far...

AWESOME, AWESOME, AWESOME ... except for the name! The STL analogue is
called 'deque<T>', so at least can we call it 'Deque<T>'?

Eddie


More information about the click mailing list