diff options
| author | Tyge Løvset <[email protected]> | 2021-03-19 13:08:05 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-03-19 13:08:05 +0100 |
| commit | 60786d8b27e9c622c43ddc8e77575c0853728014 (patch) | |
| tree | 7fd6ab6963de42b11276f4ce57fc177ba4496848 /docs/cset_api.md | |
| parent | 0183aa814b21de2f623b56d79ac0f44a2bbb0366 (diff) | |
| download | STC-modified-60786d8b27e9c622c43ddc8e77575c0853728014.tar.gz STC-modified-60786d8b27e9c622c43ddc8e77575c0853728014.zip | |
Added clear() to cpque, cstack, cqueue, cbits, even though not in STL. Code/docs formatting.
Diffstat (limited to 'docs/cset_api.md')
| -rw-r--r-- | docs/cset_api.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/cset_api.md b/docs/cset_api.md index ebca71ae..31e2a33a 100644 --- a/docs/cset_api.md +++ b/docs/cset_api.md @@ -1,7 +1,7 @@ # STC [cset](../stc/cmap.h): Unordered Set

-A **cset** is an associative container that contains a set of unique objects of type Key. Search, insertion, and removal have average constant-time complexity. See the c++ class
+A **cset** is an associative container that contains a set of unique objects of type Key. Search, insertion, and removal have average constant-time complexity. See the c++ class
[std::unordered_set](https://en.cppreference.com/w/cpp/container/unordered_set) for a functional description.
## Declaration
@@ -31,10 +31,10 @@ All cset definitions and prototypes are available by including a single header f ```c
cset_X cset_X_init(void);
cset_X cset_X_with_capacity(size_t cap);
-void cset_X_set_load_factors(cset_X* self, float min_load, float max_load);
-
cset_X cset_X_clone(cset_x set);
+
void cset_X_clear(cset_X* self);
+void cset_X_set_load_factors(cset_X* self, float min_load, float max_load);
void cset_X_reserve(cset_X* self, size_t size);
void cset_X_swap(cset_X* a, cset_X* b);
void cset_X_del(cset_X* self); // destructor
@@ -103,7 +103,7 @@ int main () c_del(cset_str, &first, &second, &third, &fourth);
printf("fifth contains:\n\n");
- c_foreach (i, cset_str, fifth)
+ c_foreach (i, cset_str, fifth)
printf("%s\n", i.ref->str);
cset_str_del(&fifth);
|
