ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::Ccl::DisjointSets Class Reference

Wrapper around boost::disjoint_sets used by the clustering helpers. More...

#include <Acts/Clusterization/Clusterization.hpp>

Public Member Functions

 DisjointSets (std::size_t initial_size=128)
 Constructor.
void clear ()
 Clear all sets and reset to initial state.
Acts::Ccl::Label findSet (std::size_t x)
 Find the representative of a set.
Acts::Ccl::Label makeSet ()
 Create a new set.
void unionSet (std::size_t x, std::size_t y)
 Union two sets.

Detailed Description

Wrapper around boost::disjoint_sets used by the clustering helpers.

Avoids the overhead of boost::vector_property_map while keeping the interface small for the clustering workflow.

Constructor & Destructor Documentation

◆ DisjointSets()

Acts::Ccl::DisjointSets::DisjointSets ( std::size_t initial_size = 128)
explicit

Constructor.

Parameters
initial_sizeInitial size of the disjoint sets

Member Function Documentation

◆ findSet()

Acts::Ccl::Label Acts::Ccl::DisjointSets::findSet ( std::size_t x)

Find the representative of a set.

Parameters
xElement to find
Returns
The label of the set containing x

◆ makeSet()

Acts::Ccl::Label Acts::Ccl::DisjointSets::makeSet ( )

Create a new set.

Returns
The label of the new set

◆ unionSet()

void Acts::Ccl::DisjointSets::unionSet ( std::size_t x,
std::size_t y )

Union two sets.

Parameters
xFirst set
ySecond set