Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/docs/examples/example-basics/dot-serialization.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const auto vertex_writer{[](graaf::vertex_id_t vertex_id,
**Edge writer**

```c++
const auto edge_writer{[](const graaf::vertex_ids_t& /*edge_id*/,
const auto edge_writer{[](const graaf::edge_id_t& /*edge_id*/,
const my_edge& edge) -> std::string {
const auto style{edge.priority == edge_priority::HIGH ? "solid" : "dashed"};
return fmt::format("label=\"{}\", style={}, color=gray, fontcolor=gray", edge.weight, style);
Expand Down Expand Up @@ -94,4 +94,4 @@ for easy visualization:
<p align="center">
<img src={require("/static/img/examples/dot-serialization-graph.png").default}></img>
</p>
</pre>
</pre>
6 changes: 3 additions & 3 deletions docs/docs/examples/example-basics/shortest-path.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ First, we create a datastructure of all edges on the shortest path such that we

```c++
// We use a set here for O(1) time contains checks
std::unordered_set<graaf::vertex_ids_t, graaf::vertex_ids_hash> edges_on_shortest_path{};
std::unordered_set<graaf::edge_id_t, graaf::vertex_ids_hash> edges_on_shortest_path{};

// Convert the list of vertices on the shortest path to edges
graaf::vertex_id_t prev{shortest_path.vertices.front()};
Expand All @@ -55,7 +55,7 @@ const auto vertex_writer{
}};

const auto edge_writer{
[&edges_on_shortest_path](const graaf::vertex_ids_t& edge_id, int edge) -> std::string {
[&edges_on_shortest_path](const graaf::edge_id_t& edge_id, int edge) -> std::string {
if (edges_on_shortest_path.contains(edge_id)) {
return "label=\"\", color=red";
}
Expand All @@ -69,4 +69,4 @@ This yields us the following visualization:
<p align="center">
<img src={require("/static/img/examples/shortest_path.png").default}></img>
</p>
</pre>
</pre>