IMP  2.4.0
The Integrative Modeling Platform
RecursivePartitionalClusteringMetric.h
Go to the documentation of this file.
1 /**
2  * \file IMP/statistics/RecursivePartitionalClusteringMetric.h
3  * \brief Cluster sets of points.
4  *
5  * Copyright 2007-2015 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPSTATISTICS_RECURSIVE_PARTITIONAL_CLUSTERING_METRIC_H
10 #define IMPSTATISTICS_RECURSIVE_PARTITIONAL_CLUSTERING_METRIC_H
11 
12 #include <IMP/statistics/statistics_config.h>
13 #include "Metric.h"
14 #include "PartitionalClustering.h"
15 #include <IMP/base/Pointer.h>
16 
17 IMPSTATISTICS_BEGIN_NAMESPACE
18 
19 /** Represent a metric for clustering data that has already been clustered
20  once. To use it, cluster things once, create one of these with the metric
21  you want (created with the original data). When you pass this metric to
22  the clustering algorithm, it will cluster the centers. You can extract the
23  clustering of the original elements using create_full_clustering().
24 */
25 class IMPSTATISTICSEXPORT RecursivePartitionalClusteringMetric : public Metric {
28 
29  public:
31  PartitionalClustering *clustering);
32  PartitionalClustering *create_full_clustering(
33  PartitionalClustering *center_cluster);
34  double get_distance(unsigned int i, unsigned int j) const IMP_OVERRIDE;
35  unsigned int get_number_of_items() const IMP_OVERRIDE;
37 };
38 
39 IMPSTATISTICS_END_NAMESPACE
40 
41 #endif /* IMPSTATISTICS_RECURSIVE_PARTITIONAL_CLUSTERING_METRIC_H */
A smart pointer to a ref-counted Object that is a class member.
Definition: Pointer.h:147
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
Compute a distance metric between two points.
double get_distance(const Plane3D &pln, const Vector3D &p)
Return the distance between a plane and a point in 3D.
Definition: Plane3D.h:71
A nullptr-initialized pointer to an IMP Object.
Cluster sets of points.
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.
A base class for clustering results where each item is in one cluster.
Store data to be clustered for distance metric based algorithms.
Definition: Metric.h:25