summaryrefslogtreecommitdiffhomepage
path: root/docs/cpqueue_api.md
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2020-12-03 13:26:22 +0100
committerTyge Løvset <[email protected]>2020-12-03 13:26:22 +0100
commit2d1934a09d42ef7245bed11abe8a330b6c0bf63d (patch)
tree07ed4f7c5e4edb6016ff819b8c01b45e35a038f9 /docs/cpqueue_api.md
parent4a415ed56dcfcc8b5642e5d3c31a7efada96712b (diff)
downloadSTC-modified-2d1934a09d42ef7245bed11abe8a330b6c0bf63d.tar.gz
STC-modified-2d1934a09d42ef7245bed11abe8a330b6c0bf63d.zip
Some fixes in priority queue docs.
Diffstat (limited to 'docs/cpqueue_api.md')
-rw-r--r--docs/cpqueue_api.md7
1 files changed, 4 insertions, 3 deletions
diff --git a/docs/cpqueue_api.md b/docs/cpqueue_api.md
index 2cdd7eca..5e033c84 100644
--- a/docs/cpqueue_api.md
+++ b/docs/cpqueue_api.md
@@ -8,10 +8,10 @@ This describes the API of the queue type **cpqueue**. Implemented as a heap.
#define using_cpqueue(X, CType, MaxOrMinHeap)
```
The macro `using_cpqueue()` must be instantiated in the global scope.
-**cpqueue** uses normally a **cvec** type as undelying implementation, specified as CType.
+**cpqueue** uses normally a **cvec** type as underlying implementation, specified as CType.
The MaxOrMinHeap argument should be specified as a < or >, representing a max-heap or a min-heap.
`X` is a type tag name and will affect the names of all cpqueue types and methods.
-Declaring `using_cpqueue(my, cvec_my);`, `X` should be replaced by `my` in the following documentation.
+Declaring `using_cpqueue(my, cvec_my, >);`, `X` should be replaced by `my` in the following documentation.
## Types
@@ -40,7 +40,8 @@ void cpqueue_X_del(cpqueue_X* self);
size_t cpqueue_X_size(cpqueue_X pq);
bool cpqueue_X_empty(cpqueue_X pq);
-cpqueue_X_value_t* cpqueue_X_top(cpqueue_X* self);
+const
+cpqueue_X_value_t* cpqueue_X_top(const cpqueue_X* self);
void cpqueue_X_push_n(cpqueue_X *self, const cpqueue_X_input_t in[], size_t size);
void cpqueue_X_emplace(cpqueue_X* self, cpqueue_X_rawvalue_t raw);