Commit Graph

126 Commits

Author SHA1 Message Date
Bailey Thompson
e45a3d1b13 Fix badge caching (#88) 2020-08-12 13:14:54 -04:00
Bailey Thompson
19f299b6c4 Fix yaml formatting (#87) 2020-08-12 12:44:35 -04:00
Bailey Thompson
1847aecaf6 Change code quality tool (#86) 2020-08-12 12:28:02 -04:00
Bailey Thompson
2123ca2891 Use size_t for all sizes in priority_queue (#83) 2020-08-10 14:22:03 -04:00
Bailey Thompson
c14222f8a6 Use size_t for all sizes in vector (#82) 2020-08-10 13:31:12 -04:00
Bailey Thompson
124d68fbf9 Reduce malloc calls in queue (#79) 2020-08-10 12:44:14 -04:00
Bailey Thompson
af869f2b46 Reduce malloc calls in stack (#78) 2020-08-10 12:30:51 -04:00
Bailey Thompson
c74b0c4caf Reduce calls to malloc in list (#77)
Reduce the number of malloc calls in list. Improves efficiency by 15%.
2020-08-10 03:00:48 -04:00
Bailey Thompson
94e5530996 Use static const (#76) 2020-08-10 00:36:12 -04:00
Bailey Thompson
c05d97e2c9 Reduce malloc calls (#75)
Reduce the number of malloc calls. Improves efficiency by 40%.
2020-08-10 00:25:33 -04:00
Bailey Thompson
00bf7d433e Change deque block size (#74)
The block size for deque now scales based on the element size.
This means that the byte count in each block remains the same,
but with bigger elements, fewer elements may be stored in each
block (but still the same number of bytes). There is an exception
for elements that are very large, and a minimum element count
exists for the block in that case.
2020-08-09 03:36:01 -04:00
Bailey Thompson
04f2a64499 Update header for deque (#73) 2020-08-08 21:33:31 -04:00
Bailey Thompson
0c45fc80c6 Rewrite deque (#72)
The deque is now 40% faster and the code is much cleaner.
2020-08-08 21:28:48 -04:00
Bailey Thompson
fdde32d981 Refactor array (#71)
The array container is now 3% faster.
2020-08-08 19:05:44 -04:00
Bailey Thompson
48b0751b6c Stub malloc toggle (#69) 2020-08-07 16:57:41 -04:00
Bailey Thompson
f56b347098 Add valgrind to makefile (#70) 2020-08-07 16:37:12 -04:00
Bailey Thompson
83bc687e93 Improve header script (#65)
Improve the header script by rewriting it so that it is fully
automated with a single command. It now updates the
included version file as well as the header.
2020-08-07 03:19:56 -04:00
Bailey Thompson
e2587bc379 Add puzzle test case (#63) 2020-08-07 01:44:03 -04:00
Bailey Thompson
163fdb32ce Fix bug which occurred when removing the last node from a list (#64) 2020-08-07 01:40:05 -04:00
Bailey Thompson
eb4f8fb1ae Fix test warnings (#62) 2020-08-06 23:18:24 -04:00
Bailey Thompson
c22b4da660 Add Makefile (#59) 1.1.2 2020-07-02 16:42:00 -04:00
Bailey Thompson
8204df72e6 Bump version to v1.1.1 (#58) v1.1.1 2019-07-10 20:58:38 -04:00
Bailey Thompson
5f3fae4b40 Fix invalid access (#57)
Fix invalid access in forward_list
2019-07-10 20:49:19 -04:00
Bailey Thompson
ee0bc1eca9 Create scripts (#55)
Create a header compilation script as well as a build script.
1.1.0
2019-06-23 17:43:18 -04:00
Bailey Thompson
c62a48680d Bump version to v1.0.3 (#54) v1.0.3 2019-06-09 00:43:15 -04:00
Bailey Thompson
8d45509d68 Forward list optimization (#53)
Add a tail pointer which is either NULL or points to the back of the list. This improves the performance when adding to the back of the list many times in a row.
2019-06-09 00:30:30 -04:00
Bailey Thompson
2b75351f8e Fix typos (#52)
Fix typos that were present in the documentation.
2019-06-08 19:40:09 -04:00
Bailey Thompson
eb7c9e8971 Improve documentation (#50)
Further improve the documentation to prevent any possible confusion.
2019-05-31 03:27:52 -04:00
Bailey Thompson
7b5536181e Bump version to v1.0.2 (#49) v1.0.2 2019-05-30 18:53:21 -04:00
Bailey Thompson
c9c22d49d7 Improve documentation (#48) 2019-05-30 18:46:33 -04:00
Bailey Thompson
a180f8c42f Update badges (#47)
Remove CodeFactor and rearrange badges.
2019-05-23 00:46:42 -04:00
Bailey Thompson
b8143b9eaa Bump version to v1.0.1 (#46) v1.0.1 2019-05-21 17:55:25 -04:00
Bailey Thompson
411af131c2 Fix negative modulo for C89 (#45)
In C89, negative integer division and modulo is implementation-defined.

Case 1: division rounds to 0 (C89/90, C99, C11, C18)
-9 / 7 -> -1
-9 % 7 -> -2

Case 2: division rounds to negative infinity (C89/90)
-9 / 7 -> -2
-9 % 7 -> 5

This change fixes the deque data structure from having negative division and modulo to prevent this implementation-defined behavior.
2019-05-21 17:46:53 -04:00
Bailey Thompson
b07e06d62e Include optimization flags (#39)
Include O3 flags and give a description of when to use a dynamic library and when to use a static library.
2019-05-13 19:55:40 -04:00
Bailey Thompson
7642d6eee8 Improve readme indenting (#38)
Code snippets are now indented the correct amount.
2019-05-12 03:14:41 -04:00
Bailey Thompson
79280551bc Add version (#37)
Add version file for v1.0.0
v1.0.0
2019-05-08 17:24:33 -04:00
Bailey Thompson
4332c05e0b Add compilation documentation (#36)
Add documentation for how to compile dynamic and static libraries.
2019-05-08 04:33:25 -04:00
Bailey Thompson
f5316e9714 Format license length (#35)
Format the license so that no lines are over 80 characters long.
2019-05-05 11:27:51 -04:00
Bailey Thompson
cf619b4032 Fix license link (#33)
Fix the link that the license badge points to.
2019-05-05 01:16:14 -04:00
Bailey Thompson
14f4a03c92 Refactor source code (#32)
Refactor large functions into smaller functions.
2019-05-05 00:57:33 -04:00
Bailey Thompson
e2d596e4bd Refactor tests (#31)
Refactor tests in order for the component or logic that they are testing to be contained into individual sub-tests instead of all tests being contained in one big test for the whole data structure.

Add testing for out-of-memory (OOM) conditions. This makes the source code now 100% covered.

Bug fix! A bug has been identified and fixed in the list data structure in the list_add_last function. This bug would occur when adding an item to the back of the list because the pointers were not being updated properly.

Minor Bug fix! A bug has been identified and fixed in the unordered_set, unordered_map, unordered_multiset, and unordered_multimap data structures in their respective unordered_xxx_put functions. This bug would occur in an out-of-memory condition, which would cause the size of the collection to increase without actually adding the new element to it.
2019-05-04 17:59:20 -04:00
Bailey Thompson
10a11dc1aa Add zero length arrays (#28) 2019-05-02 20:03:31 -04:00
Bailey Thompson
24ca9d9d9b Make c89 compatible (#27) 2019-05-02 19:34:27 -04:00
Bailey Thompson
5fe6b40c3e Make c90 compatible (#26) 2019-05-02 14:49:36 -04:00
Bailey Thompson
7c0bb4154d Add more badges (#25) 2019-05-02 14:15:07 -04:00
Bailey Thompson
20e8839143 Add more testing (#23)
Increase code coverage so that other than the out-of-memory conditions, the code is entirely covered.

Some areas of the code have been tweaked for performance optimizations.

Bug fix! A bug has been identified and fixed in the unordered_multiset data structure in the unordered_multiset_remove_all function.

This bug would occur when more than one entry exists in the bucket in which the element is occupying, and that element had a count of more than one.
2019-04-30 23:22:36 -04:00
Bailey Thompson
6b297bfc51 Add code coverage (#22) 2019-04-30 03:23:35 -04:00
Bailey Thompson
dd7af1e03c Use circle ci shield badge (#21) 2019-04-28 23:05:26 -05:00
Bailey Thompson
f08bcf6bad Improve documentation (#20) 2019-04-28 22:56:17 -05:00
Bailey Thompson
dbad152813 Fix documentation settings and add icon (#19) 2019-04-28 11:41:07 -05:00