IMP
2.0.1
The Integrative Modeling Platform
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
Metric.h
Go to the documentation of this file.
1
/**
2
* \file IMP/statistics/Metric.h
3
* \brief Cluster sets of points.
4
*
5
* Copyright 2007-2013 IMP Inventors. All rights reserved.
6
*
7
*/
8
9
#ifndef IMPSTATISTICS_METRIC_H
10
#define IMPSTATISTICS_METRIC_H
11
12
#include <IMP/statistics/statistics_config.h>
13
#include <
IMP/base/Object.h
>
14
#include <
IMP/base/object_macros.h
>
15
#include <
IMP/base/ref_counted_macros.h
>
16
17
IMPSTATISTICS_BEGIN_NAMESPACE
18
19
//! Store data to be clustered for distance metric based algorithms
20
/** Metric clustering needs a way of computing the
21
distances between the things being clustered. Classes that
22
implement this abstract base class provide a way of getting the
23
distance between any two items.
24
*/
25
class
IMPSTATISTICSEXPORT
Metric
:
public
IMP::base::Object
{
26
protected
:
27
Metric
(std::string name);
28
public
:
29
virtual
double
get_distance
(
unsigned
int
i,
30
unsigned
int
j)
const
=0;
31
virtual
unsigned
int
get_number_of_items()
const
=0;
32
IMP_REF_COUNTED_NONTRIVIAL_DESTRUCTOR
(
Metric
);
33
};
34
35
IMP_OBJECTS
(
Metric
,
Metrics
);
36
37
IMPSTATISTICS_END_NAMESPACE
38
39
#endif
/* IMPSTATISTICS_METRIC_H */