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
2 changes: 1 addition & 1 deletion benchmarks/suites/is_bipartite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <gl/algorithm.hpp>
#include <gl/graph.hpp>
#include <gl/topologies.hpp>
#include <gl/topology.hpp>

#include <benchmark/benchmark.h>

Expand Down
2 changes: 1 addition & 1 deletion include/gl/algorithm/spanning_tree/prim_mst.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ template <traits::c_undirected_graph G>
if (root_id == invalid_id)
root_id = initial_id;

for (const auto& edge : graph.incident_edges(root_id))
for (const auto& edge : graph.out_edges(root_id))
edge_queue.emplace(edge);

// mark the root vertex as visited
Expand Down
2 changes: 1 addition & 1 deletion include/gl/algorithm/templates/bfs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ bool bfs(
if (not visit(node.vertex_id, node.pred_id))
return false;

for (const auto& edge : graph.incident_edges(node.vertex_id)) {
for (const auto& edge : graph.out_edges(node.vertex_id)) {
const auto target_vertex_id = edge.other(node.vertex_id);
const auto enqueue = enqueue_vertex_pred(target_vertex_id, edge);
if (enqueue == decision::abort)
Expand Down
4 changes: 2 additions & 2 deletions include/gl/algorithm/templates/dfs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ bool dfs(
if (not visit(node.vertex_id, node.pred_id))
return false;

for (const auto& edge : graph.incident_edges(node.vertex_id)) {
for (const auto& edge : graph.out_edges(node.vertex_id)) {
const auto target_vertex_id = edge.other(node.vertex_id);
if (enqueue_vertex_pred(target_vertex_id, edge))
s.emplace(target_vertex_id, node.vertex_id);
Expand Down Expand Up @@ -96,7 +96,7 @@ void r_dfs(
visit(vertex_id, pred_id);

// recursively search vertices adjacent to the current vertex
for (const auto& edge : graph.incident_edges(vertex_id)) {
for (const auto& edge : graph.out_edges(vertex_id)) {
const auto target_vertex_id = edge.other(vertex_id);
if (enqueue_vertex_pred(target_vertex_id, edge))
r_dfs(
Expand Down
2 changes: 1 addition & 1 deletion include/gl/algorithm/templates/pfs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ bool pfs(
if (not visit(node.vertex_id, node.pred_id))
return false;

for (const auto& edge : graph.incident_edges(node.vertex_id)) {
for (const auto& edge : graph.out_edges(node.vertex_id)) {
const auto target_vertex_id = edge.other(node.vertex_id);
const auto enqueue = enqueue_vertex_pred(target_vertex_id, edge);
if (enqueue == decision::abort)
Expand Down
Loading
Loading