libGimbal 0.1.0
C17-Based Extended Standard Library and Cross-Language Runtime Framework
|
Go to the source code of this file.
Data Structures | |
struct | GblDoublyLinkedListNode |
Macros | |
#define | GBL_DOUBLY_LINKED_LIST_NPOS |
#define | GBL_DOUBLY_LINKED_LIST_NODE_INITIALIZER() |
#define | GBL_DOUBLY_LINKED_LIST_NODE(name) |
#define | GBL_DOUBLY_LINKED_LIST_ENTRY(node, structure, field) |
Typedefs | |
typedef GblLinkedListCmpFn | GblDoublyLinkedListCmpFn |
Functions | |
void | GblDoublyLinkedList_init (GblDoublyLinkedListNode *pSelf) |
void | GblDoublyLinkedList_move (GblDoublyLinkedListNode *pSelf, GblDoublyLinkedListNode *pHead) |
GblBool | GblDoublyLinkedList_empty (const GblDoublyLinkedListNode *pSelf) |
size_t | GblDoublyLinkedList_count (const GblDoublyLinkedListNode *pSelf) |
GblDoublyLinkedListNode * | GblDoublyLinkedList_at (const GblDoublyLinkedListNode *pSelf, intptr_t index) |
GblDoublyLinkedListNode * | GblDoublyLinkedList_front (const GblDoublyLinkedListNode *pSelf) |
GblDoublyLinkedListNode * | GblDoublyLinkedList_back (const GblDoublyLinkedListNode *pSelf) |
GblBool | GblDoublyLinkedList_contains (const GblDoublyLinkedListNode *pSelf, GblDoublyLinkedListNode *pNode) |
size_t | GblDoublyLinkedList_find (const GblDoublyLinkedListNode *pSelf, GblDoublyLinkedListNode *pNode) |
GblDoublyLinkedListNode * | GblDoublyLinkedList_middle (const GblDoublyLinkedListNode *pSelf) |
GblDoublyLinkedListNode * | GblDoublyLinkedList_beforeMiddle (const GblDoublyLinkedListNode *pSelf) |
void | GblDoublyLinkedList_pushBack (GblDoublyLinkedListNode *pSelf, GblDoublyLinkedListNode *pNode) |
void | GblDoublyLinkedList_pushFront (GblDoublyLinkedListNode *pSelf, GblDoublyLinkedListNode *pNode) |
void | GblDoublyLinkedList_moveBack (GblDoublyLinkedListNode *pSelf, GblDoublyLinkedListNode *pNode) |
void | GblDoublyLinkedList_moveFront (GblDoublyLinkedListNode *pSelf, GblDoublyLinkedListNode *pNode) |
GblBool | GblDoublyLinkedList_join (GblDoublyLinkedListNode *pSelf, intptr_t idx, GblDoublyLinkedListNode *pList) |
void | GblDoublyLinkedList_joinBack (GblDoublyLinkedListNode *pSelf, GblDoublyLinkedListNode *pList) |
void | GblDoublyLinkedList_joinFront (GblDoublyLinkedListNode *pSelf, GblDoublyLinkedListNode *pList) |
void | GblDoublyLinkedList_joinSorted (GblDoublyLinkedListNode *pSelf, GblDoublyLinkedListNode *pList, GblDoublyLinkedListCmpFn pCmpFn, void *pClosure) |
GblBool | GblDoublyLinkedList_insert (GblDoublyLinkedListNode *pSelf, intptr_t idx, GblDoublyLinkedListNode *pNode) |
void | GblDoublyLinkedList_insertBefore (GblDoublyLinkedListNode *pNode1, GblDoublyLinkedListNode *pNode2) |
void | GblDoublyLinkedList_insertAfter (GblDoublyLinkedListNode *pNode1, GblDoublyLinkedListNode *pNode2) |
GblDoublyLinkedListNode * | GblDoublyLinkedList_popBack (GblDoublyLinkedListNode *pSelf) |
GblDoublyLinkedListNode * | GblDoublyLinkedList_popFront (GblDoublyLinkedListNode *pSelf) |
GblBool | GblDoublyLinkedList_swap (GblDoublyLinkedListNode *pNode1, GblDoublyLinkedListNode *pNode2) |
void | GblDoublyLinkedList_remove (GblDoublyLinkedListNode *pNode) |
GblDoublyLinkedListNode * | GblDoublyLinkedList_removeBefore (GblDoublyLinkedListNode *pNode) |
GblDoublyLinkedListNode * | GblDoublyLinkedList_removeAfter (GblDoublyLinkedListNode *pNode) |
GblBool | GblDoublyLinkedList_replace (GblDoublyLinkedListNode *pNode1, GblDoublyLinkedListNode *pNode2) |
void | GblDoublyLinkedList_splitAfter (GblDoublyLinkedListNode *pSelf, GblDoublyLinkedListNode *pHead2, GblDoublyLinkedListNode *pAfter) |
GblDoublyLinkedListNode * | GblDoublyLinkedList_erase (GblDoublyLinkedListNode *pSelf, intptr_t index) |
void | GblDoublyLinkedList_clear (GblDoublyLinkedListNode *pSelf) |
void | GblDoublyLinkedList_mergeSort (GblDoublyLinkedListNode *pSelf, GblDoublyLinkedListCmpFn pCmpFn, void *pClosure) |
void | GblDoublyLinkedList_rotate (GblDoublyLinkedListNode *pSelf, intptr_t n) |
void | GblDoublyLinkedList_reverse (GblDoublyLinkedListNode *pSelf) |
GblDoublyLinkedListNode structure and related functions.
Intrustive doubly linked list structure with vector-style API.
GblDoublyLinkedListNode is the low-level API around managing manually allocated, intrusive linked list structures with the list nodes embedded within their containing structures.
Operation | Time Complexity |
---|---|
iteration | O(N) |
insertion/removal (middle) | O(N) |
insertion/removal (front or back) | O(1) |
access (front or back) | O(1) |
random access (middle) | O(N) |
Definition in file gimbal_doubly_linked_list.h.
#define GBL_DOUBLY_LINKED_LIST_NPOS |
Definition at line 18 of file gimbal_doubly_linked_list.h.
#define GBL_DOUBLY_LINKED_LIST_NODE_INITIALIZER | ( | ) |
Definition at line 19 of file gimbal_doubly_linked_list.h.
#define GBL_DOUBLY_LINKED_LIST_NODE | ( | name | ) |
Definition at line 20 of file gimbal_doubly_linked_list.h.
#define GBL_DOUBLY_LINKED_LIST_ENTRY | ( | node, | |
structure, | |||
field | |||
) |
Definition at line 21 of file gimbal_doubly_linked_list.h.
typedef GblLinkedListCmpFn GblDoublyLinkedListCmpFn |
Definition at line 25 of file gimbal_doubly_linked_list.h.