Commit Graph
65 Commits
Author SHA1 Message Date
Patrick Pelissier 1db2813aa3 Add dictionary with store computed hash, avoiding the need
of recomputation in some cases.
2018-02-28 21:06:58 +01:00
Patrick Pelissier 762d8a8e74 Update assertion 2018-02-27 22:43:17 +01:00
Patrick Pelissier b7966f6b61 Update assertions 2018-02-27 22:41:20 +01:00
Patrick Pelissier 210e05f7fc Update copyright to 2018 2018-01-29 20:28:30 +01:00
Patrick Pelissier 2089af8fd3 Fix broken code due to previous commits. 2018-01-24 22:26:46 +01:00
Patrick Pelissier 8914d336a0 dict_ref & dict_cref returns a pointer to struct pair_s instead of pair_t (which
is an array of struct pair_s).
This will break API compatibility. However:
it makes the user code cleaner as a level of indirection is removed.
it uniformizes with the OA dict version
2017-10-18 23:25:39 +02:00
Patrick Pelissier 4d328d97f1 FIXME --> TODO 2017-10-09 23:23:58 +02:00
Patrick Pelissier 8a1f24ca54 Fix issue detected by address sanitizer
(Read beyond and below the table allocation).
2017-09-27 22:57:08 +02:00
Patrick Pelissier f75bd05a02 Fix issue with dict equal_p 2017-09-17 11:29:00 +02:00
Patrick Pelissier 95f467f4be Fix potential bug in case of ill-formed serialized container. 2017-09-16 13:30:09 +02:00
Patrick Pelissier 44cdfa0c77 Remove use of feof and ferror as it is not needed as the return of fgetc
is sufficent.
2017-08-19 21:05:55 +02:00
Patrick Pelissier 5f737b3b65 Fix overflow issue. 2017-08-06 23:13:49 +02:00
Patrick Pelissier 8f213d20a5 Replace iteration + splice_back by calling spimply _splice. 2017-07-29 13:04:06 +02:00
Patrick Pelissier 80c273e6e2 Remove dict_ prefix for dictionnary.
See commit on shared-pointer.
2017-07-29 13:01:38 +02:00
Patrick Pelissier 34943e5b2a Remove array_ prefix from ARRAY_DEF
See commit on shared pointers.
2017-07-27 22:16:15 +02:00
Patrick Pelissier 4cb92a92b8 Remove list_ prefix from all lists.
See commit on shared-pointers.
Rename the iteration type to be prefix by name list_it_name_t ==> name_it_t
2017-07-27 21:40:35 +02:00
Patrick Pelissier e77e507b51 Add function reserve for OA dictionnary. 2017-07-15 23:30:00 +02:00
Patrick Pelissier 9078fb9cd0 Update comment after measurements. 2017-07-15 22:40:01 +02:00
Patrick Pelissier 28620c8cb5 Fix issue:
the function dict_oa_it_end was in fact dict_oa_it_last.
 add function dict_oa_it_end
2017-07-12 23:52:13 +02:00
Patrick Pelissier 13daf6b264 Fix issue. 2017-07-12 22:30:10 +02:00
Patrick Pelissier a1eb33344e Fix issue for OA addressing. 2017-07-12 22:23:07 +02:00
Patrick Pelissier 693c491f1e Fix issue with coverage build. 2017-07-11 23:52:48 +02:00
Patrick Pelissier 42989df5d9 Fix issue with coverage build. 2017-07-11 23:39:45 +02:00
Patrick Pelissier 2716ad425c Wrong parameter given for extra dict OA 2017-07-11 22:35:57 +02:00
Patrick Pelissier 08112a3a6d Fix issue detected by scan-build 2017-07-10 13:47:34 +02:00
Patrick Pelissier 2ef2dd1231 Add const to function definition. 2017-07-08 12:57:06 +02:00
Patrick Pelissier e8781e2860 Add new possible const due to const added to array functions. 2017-07-07 23:03:43 +02:00
Patrick Pelissier d3038cc758 Add _out_str, _in_str & _get_str to OA dict. 2017-07-06 23:14:26 +02:00
Patrick Pelissier 91affebce7 Fix wrong name in exported OPLIST for dict's out_str, get_str & in_str 2017-07-05 16:13:26 +02:00
Patrick Pelissier 76fc919ccb * Rename _slice into _splice.
* Rename _move_back into _splice_back
to uniform the interface.
2017-07-05 09:17:11 +02:00
Patrick Pelissier 61bebd3cff Fix bugs in iterator of OA dict for next/previous. 2017-06-08 23:51:09 +02:00
Patrick Pelissier 4b50020f12 Fix bugs with OA dict. 2017-06-08 23:36:12 +02:00
Patrick Pelissier 6af1c29469 Remove broken _it_end operator for standard dictionnary
(OA dict has a _it_end operator which should work).
2017-05-10 21:38:01 +02:00
Patrick Pelissier 163ea62554 Add _it_equal_p operator for both dictionnary. 2017-05-10 21:34:06 +02:00
Patrick Pelissier c210460f79 Add iteration operators for OA Dict. 2017-05-10 21:29:09 +02:00
Patrick Pelissier c1ddbdb94d Add _clean, _swap & _move for dict/oa 2017-05-09 23:55:51 +02:00
Patrick Pelissier 4b908fb22d Add _init_set, _set & _init_move for dict with Open Addressing. 2017-05-08 12:24:06 +02:00
Patrick Pelissier b207a2c03d Replace GET_INIT_MOVE by DO_INIT_MOVE
(Can't use oplist in default case).
2017-05-08 00:27:50 +02:00
Patrick Pelissier 50aa4f8b73 Remove unused dependency. 2017-05-05 00:06:22 +02:00
Patrick Pelissier 27fd810259 Rename M_OPLIST_CAT into M_OPCAT, M_OPLIST_FLAT into M_OPFLAT
Add M_OPLIST_EXTEND
Use it instead of M_OPLIST_CAT.
2017-05-01 17:24:22 +02:00
Patrick Pelissier cad77ab80b Fix issue for OA dict and shrink down:
we shall not call hash for deleted or empty entries.
2017-04-24 14:41:36 +02:00
Patrick Pelissier 1919d33602 Rewrite the way of handling the delete limits:
* count the number of deleted & populated items.
* if this number is greater than coeff_up, perform a shrink_up
* if the the population don't have more than half the size of the hash table,
* don't increase the hash table.
2017-04-24 13:22:46 +02:00
Patrick Pelissier 621f32649e Fix bug in dict oa for remove.
Improve assertions checks.
2017-04-24 10:39:39 +02:00
Patrick Pelissier 8ce7db4033 Fix some issues in Open Addressing dict. 2017-04-24 09:49:34 +02:00
Patrick Pelissier 7a60d8df62 Add Open Addressing implementation for dict:
* better for small type.
* need OOR_SET & OOR_EQUAL operators to handle out-of-range values.
2017-04-24 09:00:36 +02:00
Patrick Pelissier d19e1a5b41 Add M_EMPTY_DEFAULT which is like M_NOTHING_DEFAULT except that it doesn't
evaluate its arguments.
2017-04-23 23:36:08 +02:00
Patrick Pelissier adf15bca6f Rewrite code to use dict_t & dict_it_t (clearer)
Add missing contracts.
2017-04-23 18:53:47 +02:00
Patrick Pelissier 02be3b6d69 Remove internal dict macros for core macro. 2017-04-17 19:19:58 +02:00
Patrick Pelissier 30c5d99ca7 Fix indentation 2017-04-13 21:14:16 +02:00
Patrick Pelissier 2dd3b727ff Add mempool to dict. 2017-04-02 10:30:55 +02:00