Reworking structures for easy testing, read more

I was reworking bits of the containers to address issue #131, then
realized that the table's tests depended on a specific initial size. I'm
too buggered to finish it tonight, so I'll fix it tomorrow.
This commit is contained in:
2024-10-18 20:48:33 +11:00
parent c3ee92fcef
commit 98ea0e5884
11 changed files with 115 additions and 57 deletions

View File

@@ -0,0 +1,18 @@
//https://www.programiz.com/c-programming/online-compiler/
#include <stdio.h>
static unsigned int hashUInt(unsigned int x) {
x = ((x >> 16) ^ x) * 0x45d9f3b;
x = ((x >> 16) ^ x) * 0x45d9f3b;
x = (x >> 16) ^ x;
return x;
}
int main() {
//print the index/hash pairs
for (unsigned int i = 0; i < 100; i++) {
printf("{%u:%u}\n", i, hashUInt(i));
}
return 0;
}