Skip to content

num::structures::debug::verify_degree_consistency

Defined in header <structures/debug.hpp>

template <class G, std::integral Index = num::idx>
void verify_degree_consistency(
    const G &g, std::source_location loc = std::source_location::current());

Verify that reported degrees agree with the enumerated adjacency.

degree(u) and neighbors(u) are two presentations of the same set \(\{v : (u,v) \in E\}\); a graph whose degrees disagree with its adjacency silently corrupts every traversal built on it.