![]() |
Belle II Software
release-08-01-10
|
Implementation of the clustering Clusters elements of a given collection using the relations presented by a neighorhood. More...
#include <Clusterizer.h>
Public Types | |
using | IOTypes = std::tuple< AIOTypes... > |
Types that should be served to apply on invokation. | |
using | IOVectors = std::tuple< std::vector< AIOTypes >... > |
Vector types that should be served to apply on invokation. | |
Public Member Functions | |
void | apply (std::vector< ACellHolder * > const &cellHolders, std::vector< WeightedRelation< ACellHolder > > const &cellHolderRelations, std::vector< ACluster > &clusters) override |
Creates the clusters. More... | |
virtual std::string | getDescription () |
Brief description of the purpose of the concret findlet. | |
virtual void | exposeParameters (ModuleParamList *moduleParamList, const std::string &prefix) |
Forward prefixed parameters of this findlet to the module parameter list. | |
virtual void | apply (ToVector< AIOTypes > &... ioVectors)=0 |
Main function executing the algorithm. | |
void | initialize () override |
Receive and dispatch signal before the start of the event processing. | |
void | beginRun () override |
Receive and dispatch signal for the beginning of a new run. | |
void | beginEvent () override |
Receive and dispatch signal for the start of a new event. | |
void | endRun () override |
Receive and dispatch signal for the end of the run. | |
void | terminate () override |
Receive and dispatch Signal for termination of the event processing. | |
Protected Types | |
using | ToVector = typename ToVectorImpl< T >::Type |
Short hand for ToRangeImpl. | |
Protected Member Functions | |
void | addProcessingSignalListener (ProcessingSignalListener *psl) |
Register a processing signal listener to be notified. | |
int | getNProcessingSignalListener () |
Get the number of currently registered listeners. | |
Private Types | |
using | Super = ProcessingSignalListener |
Type of the base class. | |
Private Member Functions | |
void | expandCluster (std::vector< WeightedRelation< ACellHolder >> const &cellHolderRelations, std::vector< ACellHolder * > &cluster) const |
Helper function. Starting a new cluster and iterativelly expands it. | |
void | setCellState (ACellHolder *cellHolder, Weight cellState) const |
Setter for the cell state of a pointed object that holds an AutomatonCell. | |
Weight | getCellState (ACellHolder *cellHolder) const |
Getter for the cell state of a pointed object that holds an AutomatonCell. | |
void | setCellWeight (ACellHolder *cellHolder, Weight cellWeight) const |
Setter for the cell weight of a pointed object that holds an AutomatonCell. | |
Private Attributes | |
std::vector< ProcessingSignalListener * > | m_subordinaryProcessingSignalListeners |
References to subordinary signal processing listener contained in this findlet. | |
bool | m_initialized = false |
Flag to keep track whether initialization happend before. | |
bool | m_terminated = false |
Flag to keep track whether termination happend before. | |
std::string | m_initializedAs |
Name of the type during initialisation. | |
Implementation of the clustering Clusters elements of a given collection using the relations presented by a neighorhood.
A cluster is essentially a connected subset of all cells that can reach each other by one more relations in a neighborhood. The algorithm is essentially an iterative expansion of the neighborhood relations keeping track of the already used cells by using the CellState of the AutomatonCell.
Definition at line 40 of file Clusterizer.h.
|
inlineoverride |
Creates the clusters.
Repeatly expands a neighborhood of referenced objects that have an AutomatonCell. The CellState after the clusterization is the index of the generated cluster. The CellWeight is set to the total number of neighbors of each cell.
cellHolders | Pointers to objects that should be clustered. | |
cellHolderRelations | Relations between the objects that should be clustered | |
[out] | clusters | Groups of connected objects in the neighborhood. |
Definition at line 54 of file Clusterizer.h.