ATTPCROOT
0.3.0-alpha
A ROOT-based framework for analyzing data from active target detectors
AtReconstruction
AtPatternRecognition
triplclust
src
cluster.h
Go to the documentation of this file.
1
//
2
// cluster.h
3
// Functions for triplet clustering and for propagating
4
// the triplet cluster labels to points
5
//
6
// Author: Jens Wilberg, Lukas Aymans, Christoph Dalitz
7
// Date: 2018-08-30
8
// License: see ../LICENSE
9
//
10
11
#ifndef CLUSTER_H
12
#define CLUSTER_H
13
14
#include "
util.h
"
15
16
#include <algorithm>
17
#include <cstddef>
18
#include <vector>
19
20
class
PointCloud
;
21
struct
triplet
;
22
23
typedef
std::vector<size_t>
cluster_t
;
24
25
typedef
std::vector<cluster_t>
cluster_group
;
26
27
// compute hierarchical clustering
28
void
compute_hc
(
const
PointCloud
&cloud,
cluster_group
&result,
const
std::vector<triplet> &triplets,
double
s,
29
double
t,
bool
tauto =
false
,
double
dmax = 0,
bool
is_dmax =
false
,
Linkage
method =
SINGLE
,
30
int
opt_verbose = 0);
31
// remove all small clusters
32
void
cleanup_cluster_group
(
cluster_group
&cg,
size_t
m,
int
opt_verbose = 0);
33
// convert the triplet indices ind *cl_group* to point indices.
34
void
cluster_triplets_to_points
(
const
std::vector<triplet> &triplets,
cluster_group
&cl_group);
35
// adds the cluster ids to the points in *cloud*
36
void
add_clusters
(
PointCloud
&cloud,
cluster_group
&cl_group,
bool
gnuplot =
false
);
37
#endif
Linkage
Linkage
Definition:
util.h:13
add_clusters
void add_clusters(PointCloud &cloud, cluster_group &cl_group, bool gnuplot=false)
Definition:
cluster.cxx:212
cluster_triplets_to_points
void cluster_triplets_to_points(const std::vector< triplet > &triplets, cluster_group &cl_group)
Definition:
cluster.cxx:185
triplet
Definition:
triplet.h:20
SINGLE
@ SINGLE
Definition:
util.h:13
PointCloud
Definition:
pointcloud.h:60
cleanup_cluster_group
void cleanup_cluster_group(cluster_group &cg, size_t m, int opt_verbose=0)
Definition:
cluster.cxx:165
compute_hc
void compute_hc(const PointCloud &cloud, cluster_group &result, const std::vector< triplet > &triplets, double s, double t, bool tauto=false, double dmax=0, bool is_dmax=false, Linkage method=SINGLE, int opt_verbose=0)
Definition:
cluster.cxx:74
util.h
cluster_t
std::vector< size_t > cluster_t
Definition:
cluster.h:21
cluster_group
std::vector< cluster_t > cluster_group
Definition:
cluster.h:25
Generated on Sat Nov 11 2023 15:30:38 for ATTPCROOT by
1.8.18