sfof
Public Member Functions | Private Attributes | List of all members
UnionFind Class Reference

#include <galaxy_class.hpp>

Public Member Functions

 UnionFind ()
 This method initializes the union-find structure as a singleton. More...
 
UnionFindfind ()
 This method finds the representative element of the UF structure, while performing the path compression. More...
 
void join (UnionFind *u)
 This method joins the UnionFind passed as an argument. More...
 
bool is_singleton ()
 This method checks if an object is a singleton. More...
 

Private Attributes

UnionFindparent
 Class structure for union find algorithm. More...
 

Constructor & Destructor Documentation

◆ UnionFind()

UnionFind::UnionFind ( )

This method initializes the union-find structure as a singleton.

Member Function Documentation

◆ find()

UnionFind* UnionFind::find ( )

This method finds the representative element of the UF structure, while performing the path compression.

Returns
the representative UnionFind of the group.

◆ is_singleton()

bool UnionFind::is_singleton ( )

This method checks if an object is a singleton.

◆ join()

void UnionFind::join ( UnionFind u)

This method joins the UnionFind passed as an argument.

Parameters
[in]uUnionFind to join

Member Data Documentation

◆ parent

UnionFind* UnionFind::parent
private

Class structure for union find algorithm.

UnionFind parent.


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