CluE  1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
proxyprovider.h
Go to the documentation of this file.
1 #ifndef PROXYPROVIDER_H
2 #define PROXYPROVIDER_H
3 
4 #include <string>
5 #include "../base/solutionprovider.h"
6 
7 namespace CluE {
8 
14 template<typename T> class ProxyProvider {
15 public:
16 
17  virtual ~ProxyProvider() {
18  }
19 
27  virtual unsigned int number_of_solutions() const = 0;
28 
35  virtual unsigned int size_of_solution(unsigned int index) const = 0;
36 
42  virtual T proxy(unsigned int solutionIndex, unsigned int proxyIndex) const = 0;
43 
49  virtual std::vector<T> proxies(unsigned int solutionIndex) const = 0;
50 
56  return dynamic_cast<ProxyProvider<T>*>(s);
57  }
58 };
59 
60 }
61 
62 #endif
virtual ~ProxyProvider()
Definition: proxyprovider.h:17
Abstract base class to access results of proxy / center based clustering algorithms.
Definition: proxyprovider.h:14
virtual unsigned int size_of_solution(unsigned int index) const =0
returns the size of a particular solution
virtual T proxy(unsigned int solutionIndex, unsigned int proxyIndex) const =0
returns the proxy for the specified clustering and cluster
static ProxyProvider< T > * toProxyProvider(SolutionProvider *s)
does a dynamic cast of the given SolutionProvider to a ProxyProvider
Definition: proxyprovider.h:55
virtual unsigned int number_of_solutions() const =0
returns the number of available solutions
virtual std::vector< T > proxies(unsigned int solutionIndex) const =0
returns the proxies for the specified clustering
Abstract base class for algorithm solutions.