45 void init(
const unsigned int N);
51 unsigned int size()
const;
99 entries =
new Type[k+1];
100 end = entries + k + 1;
105 template <
class Type>
112 template <
class Type>
118 template <
class Type>
123 return (end - head) + (tail - entries);
126 template <
class Type>
129 assert(head != tail);
133 template <
class Type>
136 assert(head != tail);
137 Type *old_head = head;
144 template <
class Type>
151 assert(head != tail);
155 template <
class Type>
162 assert(head != tail);
void push_back(Type e)
Definition: kqueue.hh:156
Definition: abstractgraph.cc:35
A simple implementation of queues with fixed maximum capacity.
Definition: kqueue.hh:31
KQueue()
Definition: kqueue.hh:76
void push_front(Type e)
Definition: kqueue.hh:145
Type pop_front()
Definition: kqueue.hh:134
void init(const unsigned int N)
Definition: kqueue.hh:95
unsigned int size() const
Definition: kqueue.hh:119
void clear()
Definition: kqueue.hh:106
bool is_empty() const
Definition: kqueue.hh:113
Type front() const
Definition: kqueue.hh:127