Union Find class.
More...
#include <union_find.hpp>
|
std::unordered_map< T, T > | parent_of_ |
|
std::unordered_map< T, size_t > | rank_of_ |
|
std::size_t | max_rank_ = 0 |
|
std::size_t | num_cc_ = 0 |
|
template<typename T>
class wilderfield::UnionFind< T >
Union Find class.
Implements the union find data structure.
- Template Parameters
-
T | The type used to label graph nodes. |
◆ Find()
Find the representative of a node.
- Parameters
-
- Returns
- The representative of the node
◆ GetMaxRank()
Get the maximum rank in the union find structure.
- Returns
- The maximum rank
◆ GetNumComponents()
Get the number of connected components.
- Returns
- The number of connected components
◆ InsertNode()
Insert a new node.
- Parameters
-
◆ Union()
Perform union operation on two nodes.
- Parameters
-
The documentation for this class was generated from the following file:
- /home/runner/work/wilderfield/wilderfield/include/wilderfield/union_find.hpp