diff options
| author | Tyge Løvset <[email protected]> | 2021-03-15 16:08:14 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-03-15 16:08:14 +0100 |
| commit | 779b2b9ff0223135396989b7abb5825a9e0e1e8e (patch) | |
| tree | b6621cfc047d9a043e5a117ee0a8af4d33064513 /docs/csmap_api.md | |
| parent | 4b3e75cd8f078380c98e037c861f7d771af76f91 (diff) | |
| download | STC-modified-779b2b9ff0223135396989b7abb5825a9e0e1e8e.tar.gz STC-modified-779b2b9ff0223135396989b7abb5825a9e0e1e8e.zip | |
Added csmap_X_lower_bound() method (find >= key). Updated docs a little.
Diffstat (limited to 'docs/csmap_api.md')
| -rw-r--r-- | docs/csmap_api.md | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/docs/csmap_api.md b/docs/csmap_api.md index d314958e..4b8f058a 100644 --- a/docs/csmap_api.md +++ b/docs/csmap_api.md @@ -55,18 +55,19 @@ bool csmap_X_empty(csmap_X map); size_t csmap_X_size(csmap_X map); csmap_X_iter_t csmap_X_find(const csmap_X* self, RawKey rkey); -csmap_X_value_t* csmap_X_find_it(const csmap_X* self, RawKey rkey, csmap_X_iter_t* out); // return NULL if not found +csmap_X_iter_t csmap_X_lower_bound(const csmap_X* self, RawKey rkey); // find closest entry >= rkey bool csmap_X_contains(const csmap_X* self, RawKey rkey); +csmap_X_value_t* csmap_X_find_it(const csmap_X* self, RawKey rkey, csmap_X_iter_t* out); // return NULL if not found +csmap_X_mapped_t* csmap_X_at(const csmap_X* self, RawKey rkey); // rkey must be in map. csmap_X_result_t csmap_X_insert(csmap_X* self, Key key, Mapped mapped); // no change if key in map csmap_X_result_t csmap_X_insert_or_assign(csmap_X* self, Key key, Mapped mapped); // always update mapped csmap_X_result_t csmap_X_put(csmap_X* self, Key key, Mapped mapped); // alias for insert_or_assign + csmap_X_result_t csmap_X_emplace(csmap_X* self, RawKey rkey, RawMapped rmapped); // no change if rkey in map csmap_X_result_t csmap_X_emplace_or_assign(csmap_X* self, RawKey rkey, RawMapped rmapped); // always update rmapped void csmap_X_emplace_n(csmap_X* self, const csmap_X_rawvalue_t arr[], size_t size); -csmap_X_mapped_t* csmap_X_at(const csmap_X* self, RawKey rkey); // rkey must be in map. - size_t csmap_X_erase(csmap_X* self, RawKey rkey); csmap_X_iter_t csmap_X_erase_at(csmap_X* self, csmap_X_iter_t pos); |
