Skip to content

num::structures::debug::verify_equivalence_relation

Defined in header <structures/debug.hpp>

template <class DS, std::integral Index = num::idx>
void verify_equivalence_relation(
    DS &ds, Index n, std::source_location loc = std::source_location::current());

Sample the equivalence-relation axioms a union-find claims: reflexivity, symmetry, transitivity, and connected(u,v) agreeing with \(\mathrm{find}(u) = \mathrm{find}(v)\). Takes a mutable reference because path compression rewrites the forest.