45 void init(
const unsigned int N);
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);
A simple implementation of queues with fixed maximum capacity.
Definition: kqueue.hh:32
void init(const unsigned int N)
Definition: kqueue.hh:95
void push_front(Type e)
Definition: kqueue.hh:145
bool is_empty() const
Definition: kqueue.hh:113
unsigned int size() const
Definition: kqueue.hh:119
void push_back(Type e)
Definition: kqueue.hh:156
Type pop_front()
Definition: kqueue.hh:134
void clear()
Definition: kqueue.hh:106
KQueue()
Definition: kqueue.hh:76
Type front() const
Definition: kqueue.hh:127
Definition: abstractgraph.cc:35