Added Documentation.md
This commit is contained in:
1 parent
36d75d561e
commit
06b0a8c022
2 files changed
+468
-40
No files matched your search
@@ -4,9 +4,9 @@ Generate Simple Data Structures of any type in C for you to use in your projects
|
||||
|
||||
## How to use
|
||||
|
||||
All macros have a series of default parameters. Some might not be required or might not be used by the data structure.
|
||||
When including `macro_collections.h` in your source code you gain access to a macro called `COLLECTION_GENERATE` with the following parameters:
|
||||
|
||||
* \*__C__ - Container type (*LIST*, *LINKEDLIST*, *STACK*, *QUEUE*, *DEQUE*, *HASHMAP*, *TREEMAP*, *HASHSET*, *TREESET*, *HEAP*).
|
||||
* \*__C__ - Container type (*LIST*, *LINKEDLIST*, *STACK*, *QUEUE*, *DEQUE*, *HEAP*, *TREESET*, *TREEMAP*, *HASHSET*, *HASHMAP*).
|
||||
* \*__P__ - Permission (PRIVATE, PUBLIC). Only matters when header and source are declared in separate files.
|
||||
* *PRIVATE* - Members of a struct are hidden in source file and only accessible through functions.
|
||||
* *PUBLIC* - Members of a struct are visible.
|
||||
@@ -20,42 +20,6 @@ All macros have a series of default parameters. Some might not be required or mi
|
||||
|
||||
\*\* Required only by *HASHMAP* and *TREEMAP*
|
||||
|
||||
## List
|
||||
<hr>
|
||||
|
||||
A contiguous growable array. Elements can be added and removed from both ends of the array and also in the middle. This list can also be used to implement other data structures like stack, queues and deques, although queues and deques are implemented as a circular buffer, therefore being more efficient.
|
||||
|
||||
## LinkedList
|
||||
|
||||
A list where each element is linked by nodes. Elements can be added and removed from both ends of the list and also in the middle. The linked list can be used to implement other data structures like queues, stacks and deques.
|
||||
|
||||
## Stack
|
||||
|
||||
A LIFO/FILO structure backed by a growable array. All elements are added and removed from one end.
|
||||
|
||||
## Queue
|
||||
|
||||
A FIFO/LILO structure backed by a circular buffer. Elements are added in one end and removed from the other.
|
||||
|
||||
## Deque
|
||||
|
||||
A double-ended queue backed by a circular buffer. Elements can be added and removed from both ends but not in the middle. Can also be used as a queue.
|
||||
|
||||
## Heap
|
||||
|
||||
A heap is a nearly complete binary tree backed by a growable array. The first element of the array (or the root element of the tree) is the highest/lowest element. The min-heap is commonly used as a priority-queue and a max-heap is commonly used to sort an array of elements.
|
||||
|
||||
## HashMap
|
||||
|
||||
A hashtable that maps a key `K` to a value `V`.
|
||||
|
||||
## TreeMap
|
||||
|
||||
A balanced binary tree that maps a key `K` to a value `V`. The difference from a hashmap is that its keys are ordered.
|
||||
|
||||
## HashSet
|
||||
|
||||
A hashtable that contains only unique elements to the set. Its elements are not ordered.
|
||||
|
||||
## TreeSet
|
||||
|
||||
A balanced binary tree that contains only unique elements to the set. Its elements are ordered.
|
||||
**See Documentation.md for more information. All functions not listed in it are not meant to be used at any time, only by the structure implementation.**
|
||||
Reference in new issue
Block a user