diff options
author | Tucker Evans <tucker@tuckerevans.com> | 2020-06-11 15:19:06 -0400 |
---|---|---|
committer | Tucker Evans <tucker@tuckerevans.com> | 2020-06-11 15:19:06 -0400 |
commit | b0080d500557c6ebe407a714690ea03f78b99c7a (patch) | |
tree | 92044e6cf9b93c56303bbfc899d373d16b442d53 /collections/double_ended_queue.h | |
parent | 4165ace67ae82def6850f589310a3aa82a755c60 (diff) | |
parent | d904ea42acf2a4c03ee7dfb0f172d6deb1fd857f (diff) |
Merge branch 'develop'v0.1
Diffstat (limited to 'collections/double_ended_queue.h')
-rw-r--r-- | collections/double_ended_queue.h | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/collections/double_ended_queue.h b/collections/double_ended_queue.h index a5645e2..6448c8a 100644 --- a/collections/double_ended_queue.h +++ b/collections/double_ended_queue.h @@ -11,26 +11,33 @@ deq* deq_with_capacity(int); int deq_size(deq*); int deq_capacity(deq*); deq* deq_cp(deq*); + +/* Note: Elements are not freed + * deq_clear should be called before if they are no longer needed.*/ void deq_free(deq*); +/*Free all elements within queue*/ +void deq_clear(deq*); + /*data*/ +void deq_push_front(deq*, void*); void deq_push_back(deq*, void*); +void deq_set(deq*, int, void*); +void deq_insert(deq*, int, void*); void* deq_pop_front(deq*); -void* deq_index(deq*, int); void* deq_pop_back(deq*); +void* deq_index(deq*, int); +void* deq_front(deq*); +void* deq_back(deq*); +void* deq_swap_rm_front(deq*, int); +void* deq_swap_rm_back(deq*, int); +void deq_swap(deq*, int, int); +/*Note: Does not currently reduce memory footprint*/ +void deq_truncate(deq*, int); +void deq_reserve(deq*, int); -/* - * swap - * resevee - * truncate - * front - * back - * push/pop front - * push/pop back - * swap_rm_front/back - * insert - * remove - */ +void deq_remove(deq*, int); +void deq_print(deq*, char* (void*)); #endif |