CLUEstering
High-performance density-based weighted clustering library developed at CERN
|
The Clusterer class is the interface for running the clustering algorithm. It provides methods to set up the clustering parameters, initializes the internal buffers and runs the clustering algorithm on host or device points. More...
#include <Clusterer.hpp>
Public Member Functions | |
Clusterer (float dc, float rhoc, float dm, float seed_dc=-1.f, int pPBin=128) | |
Constuct a Clusterer object. | |
Clusterer (Queue &queue, float dc, float rhoc, float dm, float seed_dc=-1.f, int pPBin=128) | |
Constuct a Clusterer object. | |
Clusterer (Queue &queue, TilesDevice *tile_buffer, float dc, float rhoc, float dm, float seed_dc=-1.f, int pPBin=128) | |
Constuct a Clusterer object. | |
template<typename KernelType> | |
void | make_clusters (PointsHost &h_points, const KernelType &kernel, Queue &queue, std::size_t block_size) |
Construct the clusters from host points. | |
template<typename KernelType> | |
void | make_clusters (PointsHost &h_points, const KernelType &kernel, std::size_t block_size) |
Construct the clusters from host points. | |
template<typename KernelType> | |
void | make_clusters (PointsHost &h_points, PointsDevice &dev_points, const KernelType &kernel, Queue &queue, std::size_t block_size) |
Construct the clusters from host and device points. | |
template<typename KernelType> | |
void | make_clusters (PointsHost &h_points, PointsDevice &dev_points, const KernelType &kernel, std::size_t block_size) |
Construct the clusters from host and device points. | |
template<typename KernelType> | |
void | make_clusters (PointsDevice &dev_points, const KernelType &kernel, Queue &queue, std::size_t block_size) |
Construct the clusters from device points. | |
void | setWrappedCoordinates (const std::array< uint8_t, Ndim > &wrappedCoordinates) |
Specify which coordinates are periodic. | |
void | setWrappedCoordinates (std::array< uint8_t, Ndim > &&wrappedCoordinates) |
Specify which coordinates are periodic. | |
template<typename... TArgs> | |
void | setWrappedCoordinates (TArgs... wrappedCoordinates) |
Specify which coordinates are periodic. | |
std::vector< std::vector< int > > | getClusters (const PointsHost &h_points) |
Get the clusters from the host points. | |
The Clusterer class is the interface for running the clustering algorithm. It provides methods to set up the clustering parameters, initializes the internal buffers and runs the clustering algorithm on host or device points.
Ndim | The number of dimensions of the points to cluster |
clue::Clusterer< Ndim >::Clusterer | ( | float | dc, |
float | rhoc, | ||
float | dm, | ||
float | seed_dc = -1.f, | ||
int | pPBin = 128 ) |
Constuct a Clusterer object.
dc | Distance threshold for clustering |
rhoc | Density threshold for clustering |
dm | Minimum distance between clusters |
seed_dc | Distance threshold for seed points, if -1.f, dc is used |
pPBin | Number of points per bin, used to determine the tile size |
clue::Clusterer< Ndim >::Clusterer | ( | Queue & | queue, |
float | dc, | ||
float | rhoc, | ||
float | dm, | ||
float | seed_dc = -1.f, | ||
int | pPBin = 128 ) |
Constuct a Clusterer object.
queue | The queue to use for the device operations |
dc | Distance threshold for clustering |
rhoc | Density threshold for clustering |
dm | Minimum distance between clusters |
seed_dc | Distance threshold for seed points, if -1.f, dc is used |
pPBin | Number of points per bin, used to determine the tile size |
clue::Clusterer< Ndim >::Clusterer | ( | Queue & | queue, |
TilesDevice * | tile_buffer, | ||
float | dc, | ||
float | rhoc, | ||
float | dm, | ||
float | seed_dc = -1.f, | ||
int | pPBin = 128 ) |
Constuct a Clusterer object.
queue | The queue to use for the device operations |
tile_buffer | Buffer to pre-allocated tiles |
dc | Distance threshold for clustering |
rhoc | Density threshold for clustering |
dm | Minimum distance between clusters |
seed_dc | Distance threshold for seed points, if -1.f, dc is used |
pPBin | Number of points per bin, used to determine the tile size |
std::vector< std::vector< int > > clue::Clusterer< Ndim >::getClusters | ( | const PointsHost & | h_points | ) |
Get the clusters from the host points.
h_points | Host points to cluster |
void clue::Clusterer< Ndim >::make_clusters | ( | PointsDevice & | dev_points, |
const KernelType & | kernel, | ||
Queue & | queue, | ||
std::size_t | block_size ) |
Construct the clusters from device points.
dev_points | Device points to cluster |
kernel | The convolutional kernel to use for clustering |
queue | The queue to use for the device operations |
block_size | The size of the blocks to use for clustering |
void clue::Clusterer< Ndim >::make_clusters | ( | PointsHost & | h_points, |
const KernelType & | kernel, | ||
Queue & | queue, | ||
std::size_t | block_size ) |
Construct the clusters from host points.
h_points | Host points to cluster |
kernel | The convolutional kernel to use for clustering |
queue | The queue to use for the device operations |
block_size | The size of the blocks to use for clustering |
void clue::Clusterer< Ndim >::make_clusters | ( | PointsHost & | h_points, |
const KernelType & | kernel, | ||
std::size_t | block_size ) |
Construct the clusters from host points.
h_points | Host points to cluster |
kernel | The convolutional kernel to use for clustering |
block_size | The size of the blocks to use for clustering |
void clue::Clusterer< Ndim >::make_clusters | ( | PointsHost & | h_points, |
PointsDevice & | dev_points, | ||
const KernelType & | kernel, | ||
Queue & | queue, | ||
std::size_t | block_size ) |
Construct the clusters from host and device points.
h_points | Host points to cluster |
dev_points | Device points to cluster |
kernel | The convolutional kernel to use for clustering |
queue | The queue to use for the device operations |
block_size | The size of the blocks to use for clustering |
void clue::Clusterer< Ndim >::make_clusters | ( | PointsHost & | h_points, |
PointsDevice & | dev_points, | ||
const KernelType & | kernel, | ||
std::size_t | block_size ) |
Construct the clusters from host and device points.
h_points | Host points to cluster |
dev_points | Device points to cluster |
kernel | The convolutional kernel to use for clustering |
block_size | The size of the blocks to use for clustering |
void clue::Clusterer< Ndim >::setWrappedCoordinates | ( | const std::array< uint8_t, Ndim > & | wrappedCoordinates | ) |
Specify which coordinates are periodic.
wrappedCoordinates | Array of wrapped coordinates, where 1 means periodic and 0 means non-periodic |
void clue::Clusterer< Ndim >::setWrappedCoordinates | ( | std::array< uint8_t, Ndim > && | wrappedCoordinates | ) |
Specify which coordinates are periodic.
wrappedCoordinates | Array of wrapped coordinates, where 1 means periodic and 0 means non-periodic |
void clue::Clusterer< Ndim >::setWrappedCoordinates | ( | TArgs... | wrappedCoordinates | ) |
Specify which coordinates are periodic.
TArgs | Types of the wrapped coordinates, should be convertible to uint8_t |
wrappedCoordinates | Wrapped coordinates, where 1 means periodic and 0 means non-periodic |