The Fib multimedia system
Fib is a system for storing multimedia data (like images or films).
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
iClusterFunction.h
Go to the documentation of this file.
1 /**
2  * @class iClusterFunction
3  * file name: iClusterFunction.h
4  * @author Betti Oesterholz
5  * @date 17.03.2011
6  * @mail webmaster@BioKom.info
7  *
8  * System: C++
9  *
10  * This file contains the interface for evaluing a cluster value for two data points.
11  * Copyright (C) @c LGPL3 2011 Betti Oesterholz
12  *
13  * This program is free software: you can redistribute it and/or modify
14  * it under the terms of the GNU Lesser General Public License (LGPL) as
15  * published by the Free Software Foundation, either version 3 of the
16  * License, or any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU Lesser General Public License for more details.
22  *
23  * You should have received a copy of the GNU Lesser General Public License
24  * along with this program. If not, see <http://www.gnu.org/licenses/>.
25  *
26  *
27  * This file contains the interface for evaluing a cluster value for two data points.
28  * Every class, which implements this interface have to implement the operator().
29  * This operator should evalue a value for two data points.
30  * The value should indicate, how good it is to cluster the second data
31  * point dataPoint to the first dataClusterCenter.
32  * If dataPoint should be clustered to dataClusterCenter the returned value should be
33  * greater 0, else it should be lower or equal 0.
34  * The function should have the following properties:
35  * - 0 < operator( dataClusterCenter, dataPoint ) -> operator( dataPoint, dataClusterCenter ) < 0
36  * - operator( dataClusterCenter, dataPoint ) < 0 -> 0 < operator( dataPoint, dataClusterCenter )
37  * - 0 < operator( dataClusterCenter, dataPoint ) and 0 < operator( dataPoint, data3 )
38  * -> evalue( dataPoint, data3 ) < evalue( dataClusterCenter, data3 )
39  * If some of theas conditions are not given, the clustering result may
40  * be not predictebel (undesired).
41  */
42 /*
43 History:
44 17.03.2011 Oesterholz created
45 */
46 
47 #ifndef ___I_CLUSTER_FUNCTION__
48 #define ___I_CLUSTER_FUNCTION__
49 
50 #include "version.h"
51 
52 #include <utility>
53 
54 
55 namespace fib{
56 
57 namespace algorithms{
58 
59 namespace nCluster{
60 
61 template< class tDataPoint >
63 public:
64 
65  /**
66  * pure virtual destructor
67  */
68  virtual ~iClusterFunction(){
69  //nothing to do
70  }
71 
72  /**
73  * This operator should evalue a cluster value for two data points.
74  * The value should indicate how good it is to cluster the secound data
75  * point dataPoint to the first dataClusterCenter.
76  * If dataPoint should be clustered to dataClusterCenter the returned value should be
77  * greater 0, else it should be lower or equal 0.
78  * The function should have the following properties:
79  * - 0 < evalue( dataClusterCenter, dataPoint ) -> evalue( dataPoint, dataClusterCenter ) < 0
80  * - evalue( dataClusterCenter, dataPoint ) < 0 -> 0 < evalue( dataPoint, dataClusterCenter )
81  * - 0 < evalue( dataClusterCenter, dataPoint ) and 0 < evalue( dataPoint, data3 )
82  * -> evalue( dataPoint, data3 ) < evalue( dataClusterCenter, data3 )
83  * If some of theas conditions are not given, the clustering result may
84  * be not predictebel (undesired).
85  *
86  * @param dataClusterCenter the data point, to which to evalue the
87  * value that dataPoint is clustered to it
88  * @param dataPoint the data point to cluster/subsume by dataClusterCenter
89  * @return the cluster value for dataClusterCenter and dataPoint
90  */
91  virtual double operator() ( const std::pair< tDataPoint, unsigned long > & dataClusterCenter,
92  const std::pair< tDataPoint, unsigned long > & dataPoint ) const = 0;
93 
94 };//class iClusterFunction
95 
96 
97 };//end namespace nCluster
98 };//end namespace algorithms
99 };//end namespace fib
100 
101 
102 #endif //___I_CLUSTER_FUNCTION__
103 
104 
105 
106