Commit graph

27 commits

Author SHA1 Message Date
70415c6caf Impl. way to set custom hasher for hash_map
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 8s
2024-09-21 18:43:23 +09:00
4a69d281de Convert "unsigned long long" to "uint64_t"
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 5s
Missed during previous changes using stdint.h .
2024-09-21 11:55:26 +09:00
5068a1b90d clang-format
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 4s
2024-09-21 11:43:25 +09:00
bb574d2a2c Use stdint.h types instead of "int", "long", etc.
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 7s
2024-09-20 21:40:35 +09:00
ed85ded967 Add single-ptr variants data structures' free fns
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 6s
2024-09-13 12:51:09 +09:00
6b862ab022 Refactor priority-heap insert fn
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 6s
priority-heap insert now takes a pointer to a priority-heap instead of a
double pointer.
2024-09-13 11:33:15 +09:00
2252b7d732 Refactor data_structures/hash_map rehash fn
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 5s
2024-09-11 12:46:27 +09:00
3408183b39 Refactor hash_map insert to use single ptr
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 6s
Previous implementation used a double ptr for inserting into a hash map.
This refactoring allows for only needing to use a single ptr.

Fixes #17 .
2024-09-09 11:25:00 +09:00
425fa77900 Fixes related to compiler warnings
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 4s
Fix integer mismatch usages/comparisons.

Use "size_t" instead of "unsigned int" for data structures.
2024-09-06 14:28:31 +09:00
4cd660ffd5 hash_map: Use const where applicable
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 5s
2024-09-04 15:30:37 +09:00
dd1a8abdd4 hash_map iter fn: const key-value, update unittest
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 52s
2024-09-01 15:40:17 +09:00
aeb8eff350 Impl. hash_map iter, clang-format
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 52s
2024-09-01 15:13:26 +09:00
2e46790ece Switch to ISC License
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 52s
2024-08-30 11:36:11 +09:00
4985672ea2 Impl. extract "white-list"
When extracting, the given positional args will determine a "white-list"
of files to extract. If no positional args are given, then all files in
the archive will be extracted.
2024-07-18 15:30:05 +09:00
41fde43eed Impl. basic functionality "MVP"
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 48s
"MinimumViableProduct", resolves #2 .

TODO:
  Support de/compressor cmds when creating archive.
  Support symbolic links when creating archive.
  Support extracting archive.
2024-07-16 16:16:58 +09:00
e06e65e5e8 Impl. parser accepting files and dirs
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 4s
Fix memory leak in hash_map.

Current "main" prints specified files and subfiles of specified
directories.

TODO: Handle symbolic links
2024-07-03 19:56:26 +09:00
467c09a0e4 Fix unit test for priority heap
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 3s
2024-06-30 20:02:47 +09:00
9e95c5e292 Change priority_heap to accept "less_fn"
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 3s
This allows for reverse order in the priority heap by using a "more_fn"
in place of a "less fn".
2024-06-30 17:29:24 +09:00
d815f67b2d Minor fix to doc comment about priority heap
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 3s
2024-06-30 15:35:27 +09:00
fbe62ba5b2 Impl. priority heap, minor tweaks/fixes
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 3s
Implemented a priority heap.

Added tests for the priority heap.

Add a "default" lcg generator function.

Tweak hash_map to use the default lcg generator function.

`clang-format`.
2024-06-30 15:32:17 +09:00
aa2a1bf583 Fix hashing in hash_map (hopefully finally) 2024-06-28 18:19:29 +09:00
da72a2387f Fix hash_map hashing (hopefully the final time) 2024-06-28 18:17:38 +09:00
c5b2ca6dff Fix hashing in hash_map 2024-06-28 18:15:40 +09:00
d6878b0f1d Revert "Minor additions to unit test of data structures"
This reverts commit f1bab48fb5.

Unnecessary checks were added that were already checked by the preceding
for statement.
2024-06-28 17:40:29 +09:00
f1bab48fb5 Minor additions to unit test of data structures 2024-06-28 17:38:43 +09:00
4d260e4a7b Impl. hash_map
Also implemented the linear congruential generator algorithm for
generating hash values for the hash_map.

Tweaks to linked_list api to support "check functions" with supplied
user data.
2024-06-28 17:31:34 +09:00
6ac7edbb3b Implement a linked list data structure 2024-06-28 13:54:38 +09:00