| igraph Reference Manual |
|---|
int igraph_dqueue_push (igraph_dqueue_t* q, igraph_real_t elem);
Append an element to the end of the queue.
Arguments:
|
The queue. |
|
The element to append. |
Returns:
Error code. |
Time complexity: O(1) if no memory allocation is needed, O(n), the number of elements in the queue otherwise. But not that by allocating always twice as much memory as the current size of the queue we ensure that n push operations can always be done in at most O(n) time. (Assuming memory allocation is at most linear.)
<< 6.10. igraph_dqueue_pop_back — Remove the tail |
7. Maximum and minimum heaps >> |