openjij
Framework for the Ising model and QUBO.
Loading...
Searching...
No Matches
openjij::utility::UnionFind Struct Reference

#include <union_find.hpp>

Public Types

using Node = std::size_t
using Parent = std::vector<Node>
using Rank = std::vector<Node>
using size_type = Parent::size_type

Public Member Functions

 UnionFind (size_type n)
void unite_sets (Node x, Node y)
Node find_set (Node node)
Parent get_roots () const

Private Attributes

Parent _parent
Rank _rank

Member Typedef Documentation

◆ Node

using openjij::utility::UnionFind::Node = std::size_t

◆ Parent

◆ Rank

◆ size_type

using openjij::utility::UnionFind::size_type = Parent::size_type

Constructor & Destructor Documentation

◆ UnionFind()

openjij::utility::UnionFind::UnionFind ( size_type n)
inlineexplicit

References _parent, and _rank.

Member Function Documentation

◆ find_set()

◆ get_roots()

Parent openjij::utility::UnionFind::get_roots ( ) const
inline

References _parent.

◆ unite_sets()

void openjij::utility::UnionFind::unite_sets ( Node x,
Node y )
inline

Member Data Documentation

◆ _parent

Parent openjij::utility::UnionFind::_parent
private

◆ _rank

Rank openjij::utility::UnionFind::_rank
private

Referenced by UnionFind(), and unite_sets().


The documentation for this struct was generated from the following file: