MeshLib C++ Docs
Loading...
Searching...
No Matches
MRUnionFind.h File Reference
#include "MRVector.h"
#include "MRTimer.h"
#include <atomic>
#include <utility>

Go to the source code of this file.

Classes

class  MR::BaseUnionFind< I >
 base of union-find data structures: stores only the parent forest and the operations that depend on it alone, so it is shared by the sequential UnionFind and the ParallelUnionFind More...
class  MR::UnionFind< I >
 Union-find data structure for representing disjoint sets of elements with few very quick operations: 1) union of two sets in one, 2) checking whether two elements pertain to the same set, 3) finding representative element (root) of each set by any set's element. Sequential implementation that selects the root of a united pair by set size for best performance. More...
class  MR::ParallelUnionFind< I >
 Union-find that supports lock-free concurrent construction via uniteAtomic(). It links by element id (the smaller id becomes the set root), which keeps the forest acyclic without locks; consequently it does not maintain set sizes (use BaseUnionFind::roots() to read the result). More...

Namespaces

namespace  MR
 only for bindings generation