// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details #pragma once #include "Luau/Id.h" #include namespace Luau::EqSat { /// See . struct UnionFind final { Id makeSet(); Id find(Id id) const; Id find(Id id); // Merge aSet with bSet and return the canonicalized Id into the merged set. Id merge(Id aSet, Id bSet); private: std::vector parents; std::vector ranks; private: Id canonicalize(Id id) const; }; } // namespace Luau::EqSat