summaryrefslogtreecommitdiffhomepage
path: root/docs/cpqueue_api.md
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2020-12-03 14:22:01 +0100
committerTyge Løvset <[email protected]>2020-12-03 14:22:01 +0100
commit870a601a62c804f9d15efe5856cc6018b076dfe6 (patch)
treecdd38bfd44bd12b17f682b09163bf06039c9db5e /docs/cpqueue_api.md
parent79be0ee109904542ed0ece119c0432f4b629cd44 (diff)
downloadSTC-modified-870a601a62c804f9d15efe5856cc6018b076dfe6.tar.gz
STC-modified-870a601a62c804f9d15efe5856cc6018b076dfe6.zip
Some more fixes.
Diffstat (limited to 'docs/cpqueue_api.md')
-rw-r--r--docs/cpqueue_api.md21
1 files changed, 11 insertions, 10 deletions
diff --git a/docs/cpqueue_api.md b/docs/cpqueue_api.md
index 677973b7..24e88fc9 100644
--- a/docs/cpqueue_api.md
+++ b/docs/cpqueue_api.md
@@ -5,22 +5,23 @@ This describes the API of the queue type **cpqueue**. Implemented as a heap.
## Declaration
```c
-#define using_cpqueue(X, CType, MaxOrMinHeap)
+#define using_cpqueue(X, ctype, heap_variant)
```
The macro `using_cpqueue()` must be instantiated in the global scope.
-**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.
+**cpqueue** uses normally a **cvec** type as underlying implementation, specified as `ctype`.
+The `heap_variant` argument should be given as `<` or `>`, specifying a *max-heap* or a *min-heap*.
+Note that the function `{ctype}_value_compare(x, y)` defined by the underlying vector type is used to
+compare values (priorities). `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.
## Types
-| Type name | Type definition | Used to represent... |
-|:-----------------------|:---------------------------------------|:------------------------------------|
-| `cpqueue_X` | Depends on underlying container type | The cpqueue type |
-| `cpqueue_X_value_t` | | The cpqueue element type |
-| `cpqueue_X_input_t` | | cpqueue input type |
-| `cpqueue_X_rawvalue_t` | | cpqueue raw value type |
+| Type name | Type definition | Used to represent... |
+|:-----------------------|:----------------------------------------|:--------------------------|
+| `cpqueue_X` | `struct {cpqueue_X_value_t* data; ...}` | The cpqueue type |
+| `cpqueue_X_value_t` | Depends on underlying container type | The cpqueue element type |
+| `cpqueue_X_input_t` | " | cpqueue input type |
+| `cpqueue_X_rawvalue_t` | " | cpqueue raw value type |
## Header file