API sketches of the later algorithms#
The 0.1 API is frozen (ADR 0023): core/*, graph/*, update.hpp, sssp.hpp and
cycle_count.hpp. The algorithms and the container that follow it are designed now, against that
frozen contract, so that the 0.1 API does not have to change for them (PLAN Section 5, risk R4).
The pages below are reviewed sketches: each was checked against the API review checklist
(API review checklist) and the uniform algorithm contract (ADR 0006), and
each lists what it needs from the frozen headers and what is still open. They are not contracts:
CI does not check them, and each is frozen by the milestone that implements it (PLAN Section 11).
Sketch |
Release |
Container |
Family |
Frozen in |
|---|---|---|---|---|
0.2 |
|
fixed point (K x |
M7 |
|
Sketch: hypergraph and hyperedge_batch (0.3) (with |
0.3 |
the new |
- |
M8 |
0.3 |
|
aggregate delta |
M9 |
|
0.4 |
|
fixed point |
M10 |
|
0.4 |
|
fixed point (on the line graph) |
M11 |
What every sketch keeps from the frozen contract#
One header
<dyng/<name>.hpp>, a flat namespacedyng::<name>, and the five namesoptions,stats,result,compute(),update()with the frozen signatures’ shape:compute(res, container, inputs..., opt) -> resultnever mutates the container;update(res, container&, batch, result&) -> statsapplies the batch and updates the result.optionsis an aggregate with defaults (fields appended only); inputs fixed atcompute()are arguments or read-only afterwards; tunables change throughresult::set_options().statsderives fromupdate_statsand has abatchmember with what the commit did (apply_summaryfor graphs,hyper_apply_summaryfor hypergraphs); every counter is marked deterministic or schedule-dependent.resultis opaque (pimpl), move-only, withget_options()/set_options(),graph_version(),space()andclone(res); a failed update after the commit poisons it (@guarantee: strong before the commit, basic after it).Several results on one container go through
dyng::update(res, c, batch, r1, r2, ...): each algorithm specializesdetail::update_traitsfor its result, and the hypergraph addsdetail::participant_of<hypergraph<...>>.Enumerations are
enum classwith snake_case values and ato_string(); errors derive fromdyng::error; profiler stages are<name>.<hook>[.<sub>].The registry entry (
manifest.toml) declares the family, container, backends, determinism, oracle kind and graph requirements, and the conformance kit runs C1-C12 from it (The conformance kit and the algorithm tooling).
The pages use the planned header paths of PLAN Section 4.2. Where a sketch differs from the
plan’s own sketch in Section 5, the page says why (usually: the plan’s sketch predates the frozen
stats : update_stats and apply_summary shapes).