70 Commits

Author SHA1 Message Date
jun
864bd70ece Add more guf_str tests 2025-05-08 20:38:25 +02:00
jun
1013616b2d Re-implement guf_str tokeniser 2025-05-02 21:54:39 +02:00
jun
c6b0aa8d89 Add guf_str hash functions 2025-04-24 02:55:39 +02:00
jun
e98dc3b91e Fix guf_str bugs and add tests 2025-04-24 01:43:24 +02:00
jun
0910ee4bd8 Minor guf_id_pool changes 2025-04-09 06:27:35 +02:00
jun
f3e184da73 Fix guf_dict_init_with_capacity kv_idx_cap calculation 2025-03-29 17:32:13 +01:00
jun
ae7814fe7c Comment guf_rand 2025-03-29 16:16:06 +01:00
jun
d062784425 Add separate 32/64 bit versions to guf_rand 2025-03-29 01:55:32 +01:00
jun
05f995e855 Add guf_rand_splitmix32 2025-03-28 22:09:15 +01:00
jun
461006746e Add guf_str_substr 2025-03-28 20:26:43 +01:00
jun
9e0cd79ca0 Add guf_dict_shrink_capacity 2025-03-28 18:32:07 +01:00
jun
3ff4cd7572 Add more dict functions 2025-03-21 18:57:22 +01:00
jun
3ee07078f0 Add comments 2025-03-21 00:51:29 +01:00
jun
7630ecfdcf Change directory structure 2025-03-21 00:22:34 +01:00
jun
275f46226d Add more guf_str functions 2025-03-20 23:30:45 +01:00
jun
21d1b04e6b Add changeable load factor 2025-03-20 20:29:21 +01:00
jun
534ff261ca Add move- and copy ctors to dict and guf_str 2025-03-20 15:29:18 +01:00
jun
c039e24996 Use SIZE_MAX instead of SIZE_T_MAX 2025-03-19 23:03:10 +01:00
jun
29014f4c52 Fix dict asserts 2025-03-19 19:16:31 +01:00
jun
48b366d8e9 Fix warnings in release 2025-03-19 18:29:52 +01:00
jun
7e1bbc769e Replace puts with fputs in guf_err_to_str 2025-03-19 18:14:06 +01:00
jun
1e534731bb Pass key_hash to guf_dict_find_idx to avoid re-computation 2025-03-19 17:03:12 +01:00
jun
b01e087c85 Fix GUF_DICT_64_BIT_IDX and guf_dict_max_capacity() 2025-03-19 16:16:41 +01:00
jun
6a7bd2bd97 Use single u32/u64 as GUF_DICT_KV_META_T instead of two 2025-03-19 15:23:32 +01:00
jun
e535d39e3d Fix allocation overflow for guf_dbuf and guf_dict
(Implement GUF_ALLOC_MAX_BYTES and GUF_ALLOC_MAX_CAPACITY).
2025-03-18 13:43:36 +01:00
jun
cc0413116d Improve guf_id_pool 2025-03-17 23:08:30 +01:00
jun
ad884ee1e9 Implement guf_str 2025-03-17 21:17:07 +01:00
jun
9ddea4bb07 Change short-string approach to use 32 instead of 40 bytes 2025-03-11 12:24:44 +01:00
jun
c860a6ccfe Add 3x3 matrix inversion 2025-03-08 11:25:57 +01:00
jun
ae104919e0 Change linalg mat_inverse.
Still not sure whether it's better to calculate
rref[pivot_row][col] * (rref[row][pivot_col] / pivot_val) (option 1)
vs.
rref[pivot_row][col] * rref[row][pivot_col] / pivot_val   (option 2)

(i.e.  a * b / c vs. "a * (b/c))

in terms of floating point error.

But I think option 1 (current commit) is better, since the scale factor
(rref[row][pivot_col] / pivot_val) is always <= 1 here (I think).
2025-03-07 21:24:53 +01:00
jun
dac1d159b1 Fix linalg bugs 2025-03-07 16:06:45 +01:00
jun
9096a4f9c9 Add guf_nearly_zero/one 2025-03-07 13:42:28 +01:00
jun
7b433cd776 Add matrix inversion 2025-03-07 10:58:08 +01:00
jun
364dd603cf Fix guf_dict size types 2025-03-06 13:51:32 +01:00
jun
d057d76334 Rename GUF_STATIC_BUF_SIZE 2025-03-06 12:02:18 +01:00
jun
e489dd694b Add quaternion operations 2025-03-06 11:52:24 +01:00
jun
fc8118c182 Add linear algebra functions 2025-03-04 12:30:02 +01:00
jun
24bc8d5a15 Add guf_str_view functions 2025-03-04 08:18:35 +01:00
jun
301477f5c6 Add GUF_CSTR_TO_VIEW_CPP 2025-03-04 08:01:41 +01:00
jun
9d62df6a83 Add more dict tests 2025-03-04 06:52:42 +01:00
jun
8e6ffcdc70 Add dict_erase tests 2025-03-03 16:14:13 +01:00
jun
a41ff868f2 Fix guf_dict probing 2025-03-03 11:28:40 +01:00
jun
4d97725bba Fix guf_dict growth bug 2025-03-02 21:41:30 +01:00
jun
cd1c1cd5db Refactor 2025-03-02 18:25:54 +01:00
jun
8b02eff3b7 Make preserved_delims work (in guf_str_next_tok) 2025-02-27 13:02:28 +01:00
jun
217622d816 Add tokeniser 2025-02-27 10:21:21 +01:00
jun
d450cd8a45 Add utf-8 handling 2025-02-27 07:12:43 +01:00
jun
60e2849b01 Work on utf-8 2025-02-26 03:57:04 +01:00
jun
7a990c810e Add more tests 2025-02-25 15:12:38 +01:00
jun
6abe12c4c1 Improve tests 2025-02-25 14:01:20 +01:00