feat(Algorithms): add indexed graph views, work budgets, and iterative traversals/topology (S-ALGORITHMS-02)

This commit is contained in:
faumaray committed 2026-11-24 03:36:10 +03:00
1 parent 710a9c1833
commit bfd6246d32
6 files changed
+1128

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
#include <Void/Algorithms/Graph.hpp>
#include <vector>
int main()
{
const std::vector<std::vector<std::size_t>> dag{
{1, 2},
{3},
{3},
{},
};
const Void::Algorithms::AdjacencyView view{dag};
const auto sp = Void::Algorithms::shortest_path_unweighted(view, 0, 3);
const auto topo = Void::Algorithms::topological_order(view);
if (!sp || !sp->found || sp->distance != 2 || !topo || topo->order.size() != 4) {
return 1;
}
return 0;
}