aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-07-24Add first/last getters for maps.mapsTucker Evans
2020-07-24Add swap function for mapsTucker Evans
2020-07-24Fix map AVL rotationsTucker Evans
2020-07-21Add remove to header and documentation for mapsTucker Evans
2020-07-21Add AVL checks to map removeTucker Evans
2020-07-21Fix map removeTucker Evans
Didn't update parents of some nodes.
2020-07-21Fix map avl rotationsTucker Evans
2020-07-18Add basic remove to mapsTucker Evans
TODO: keep AVLness of tree after remove.
2020-07-18Fix move map free functions within src for function declarations.Tucker Evans
map_free_aux() was called in remove (not added yet), and needed the function declaration earlier moving free functions next to structure declaration seemed the best organization for this.
2020-07-08Fix implement AVL rotations/rebalancing on map insertionsTucker Evans
Auxiliary insert function now takes a pointer to pointer to map node so it can pass the inserted nodes address back (while keeping int based error returns).
2020-07-08Fix which rotates should be done for map rebalanceTucker Evans
The rotations were just mirrors of what they should be, nothing really complicated.
2020-07-08Fix check for null sub trees before setting parent during map rotationTucker Evans
2020-07-08Fix return on null tree for map balance factorTucker Evans
2020-07-08Add rebalance function for map treesTucker Evans
2020-07-08Fix map size was returning +1 for NULL leavesTucker Evans
2020-07-08Add rotate functions for map treesTucker Evans
2020-07-08Fix key comparisons where backwardsTucker Evans
Didn't affect anything other than being backwards to how binary trees are classically visualized i.e. left sub trees are less than a node and right sub trees are greater than.
2020-07-08Fix separate base map type from tree structure (nodes)Tucker Evans
This was initially needed so we can rotate on the root node, also should cut down on memory usage (albeit by a tiny amount) by not copying the comparison function pointer with every node. It feels like a more clean solution anyways. ---------------------------------------------------------------------- Squashed commit of the following: commit 056e73216cd850ae563fb6da27657cf17d0514b6 Author: Tucker Evans <tucker@tuckerevans.com> Date: Wed Jul 8 14:33:39 2020 -0400 Fix map free types with auxiliary function for map trees commit 1014cb41b38e987062040afd338f34a12fc0e7bc Author: Tucker Evans <tucker@tuckerevans.com> Date: Wed Jul 8 14:33:03 2020 -0400 Fix map clear types with auxiliary function for map trees commit 913d1f5e4358e7a8a3057027698320050a1ea472 Author: Tucker Evans <tucker@tuckerevans.com> Date: Wed Jul 8 14:28:54 2020 -0400 Fix index map types with auxiliary function for map trees commit 8d76fc0b4abcd49f67f7bff55a4da83b7ab457d6 Author: Tucker Evans <tucker@tuckerevans.com> Date: Wed Jul 8 14:27:42 2020 -0400 Fix map set key types with auxilary function for map trees commit fec252a5214ab02dccfe90bfe8b548e0e872f6ef Author: Tucker Evans <tucker@tuckerevans.com> Date: Wed Jul 8 14:22:59 2020 -0400 Fix check key ptr types with auxiliary function for map tree commit 9170db7f6aaefa1b0824e0b4a2a4acc73865c151 Author: Tucker Evans <tucker@tuckerevans.com> Date: Wed Jul 8 14:17:22 2020 -0400 Fix change set val types with auxilary function for map trees commit 9be9d3d5fd07541fbe6d4c1ec97be9c943b1455d Author: Tucker Evans <tucker@tuckerevans.com> Date: Wed Jul 8 14:04:00 2020 -0400 Fix map insert types with auxiliary function for map trees commit 2a561c8320f6be8b415d62e1175ef4ff4f845962 Author: Tucker Evans <tucker@tuckerevans.com> Date: Wed Jul 8 14:00:15 2020 -0400 Fix map size types with auxiliary function for map trees commit 361645cbb4578900d6b3d32a84b9a2b94716d5d1 Author: Tucker Evans <tucker@tuckerevans.com> Date: Wed Jul 8 13:59:32 2020 -0400 Fix change new function for map type change commit 9a99bc4149307a1fa012bcb98bedf2a8569a822c Author: Tucker Evans <tucker@tuckerevans.com> Date: Wed Jul 8 13:58:57 2020 -0400 Fix internal functions for change in map type commit 0335d8fd4f7aaf2e24e282bd39d02bc2714b0061 Author: Tucker Evans <tucker@tuckerevans.com> Date: Wed Jul 8 13:53:44 2020 -0400 Add struct to hold metadata/root of tree for map This was needed so we can rotate on the root node, also should cut down on memory usage (albeit by a tiny amount) by not copying the comparison function pointer with every node.
2020-07-08Add check key ptr for map to ease memory management of keysTucker Evans
2020-07-08Add note on NULL keysTucker Evans
2020-07-08Fix rename map_reset_key to map_set_keyTucker Evans
2020-07-08Fix map insert error returnsTucker Evans
Makes inserting an equivalent key an error, set_val should be used.
2020-07-08Add balance factor computation for map nodesTucker Evans
2020-07-08Add height helper function for mapsTucker Evans
2020-07-08Fix access node's key not passed key for maps index/insertTucker Evans
2020-07-08Add index function for mapsTucker Evans
2020-07-08Add reset key function for mapsTucker Evans
Allows changing the pointer to key when they are equivalent (by cmp function), to avoid memory leaks that could happen if we assumed either pointer was to be freed or overwritten.
2020-07-08Add insert function for mapsTucker Evans
2020-07-08Add new_from_parent function for mapsTucker Evans
Allows setting the parent field and cmp members in a simple way.
2020-07-08Add clear & free functions for mapsTucker Evans
2020-07-08Add size function for mapsTucker Evans
2020-07-08Add constructor for mapsTucker Evans
2020-07-08Add structs/typedefs for mapsTucker Evans
2020-07-06Fix ordering of functions in double ended queue documentationTucker Evans
2020-07-06Fix double ended queue did not print free stringsTucker Evans
Because it is possible for to_string function to generate a new string here and nothing else sees it after printing it is not guaranteed to be freed leading to a memory leak. This does mean that if the string is internal to a struct and expected to be used later then to_string should duplicate said string (as noted in the documentation).
2020-07-06Fix double ended queue removeTucker Evans
Did not return the removed object, could easily lead to a memory leak.
2020-07-06Fix organize functions order in double ended queue src filesTucker Evans
2020-07-04Merge branch 'vector' into developTucker Evans
2020-07-04Add reserve function to vectorsTucker Evans
2020-07-04Fix vector print function now frees string representationsTucker Evans
2020-07-04Add truncate to vectorsTucker Evans
2020-07-04Add remove function for vectorsTucker Evans
Removes element at an index.
2020-07-04Add insert function for vectorsTucker Evans
2020-07-04Fix bounds checking for vector popTucker Evans
Would have failed given a negative index.
2020-07-04Add swap_pop function for vectorsTucker Evans
2020-07-04Add swap function to vectorsTucker Evans
2020-07-04Add set index function for vectorsTucker Evans
2020-07-04Add back function to vectorsTucker Evans
back() returns the element in the last position without removing it.
2020-07-04Fix remove "_back" from pop/push calls in vector docTucker Evans
These were left in some examples after copying from double ended queue documentation.
2020-07-04Add function to get capacity of a vectorTucker Evans