Source code for a linked list implementation.
More...
|
linked_cell | linked_list_get (linked_list list, int idx) |
| Get a cell from a linked list by its index. More...
|
|
bool | linked_cell_smaller (linked_list cell1, linked_list cell2) |
|
void | linked_list_insert_unsorted (linked_list *p_list, int row, int column) |
| Insert an element into a linked list, at the first position. More...
|
|
void | linked_list_insert (linked_list *p_list, int row, int column) |
| Insert an element into a linked list, sorted by row and column. More...
|
|
void | linked_list_delete (linked_list *p_list, int row, int column) |
| Delete an element from a linked list. More...
|
|
void | linked_list_free (linked_list list) |
| Free a linked list from memory. More...
|
|
Source code for a linked list implementation.
- Author
- Victor Colomb (vic.c.nosp@m.ol@h.nosp@m.otmai.nosp@m.l.fr)
- Date
- 2021-03-06
◆ linked_list_delete()
void linked_list_delete |
( |
linked_list * |
p_list, |
|
|
int |
row, |
|
|
int |
column |
|
) |
| |
Delete an element from a linked list.
- Parameters
-
p_list | pointer to a linked list |
idx | |
- Precondition
idx
has to be inferior to the number of cells in the list
◆ linked_list_free()
Free a linked list from memory.
- Parameters
-
◆ linked_list_get()
Get a cell from a linked list by its index.
- Parameters
-
- Precondition
idx
has to be inferior to the number of cells in the list
- Returns
- linked_cell of the given index
◆ linked_list_insert()
void linked_list_insert |
( |
linked_list * |
p_list, |
|
|
int |
row, |
|
|
int |
column |
|
) |
| |
Insert an element into a linked list, sorted by row and column.
- Parameters
-
p_list | pointer to a linked list |
row | |
column | |
◆ linked_list_insert_unsorted()
void linked_list_insert_unsorted |
( |
linked_list * |
p_list, |
|
|
int |
row, |
|
|
int |
column |
|
) |
| |
Insert an element into a linked list, at the first position.
- Parameters
-
p_list | pointer to a linked list |
row | |
column | |