CluE  1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
discreteproxyprovider.h
Go to the documentation of this file.
1 #ifndef DISCRETEPROXYPROVIDER_H
2 #define DISCRETEPROXYPROVIDER_H
3 
4 #include "../base/solutionprovider.h"
5 
6 #include <vector>
7 
8 namespace CluE
9 {
10 
16 template<typename T> class DiscreteProxyProvider
17 {
18 public:
19 
21  {
22  }
23 
31  virtual unsigned int number_of_solutions() const = 0;
32 
39  virtual unsigned int size_of_solution(unsigned int index) const = 0;
40 
47  virtual T* discrete_proxy(unsigned int solutionIndex, unsigned int proxyIndex) const = 0;
48 
55  virtual std::vector<T*> discrete_proxies(unsigned int solutionIndex) const = 0;
56 
62  {
63  return dynamic_cast<DiscreteProxyProvider<T>*>(s);
64  }
65 };
66 
67 }
68 
69 #endif
static DiscreteProxyProvider< T > * toDiscreteProxyProvider(SolutionProvider *s)
Does a dynamic cast of the given SolutionProvider to a DiscreteProxyProvider.
virtual T * discrete_proxy(unsigned int solutionIndex, unsigned int proxyIndex) const =0
Returns a pointer to the proxy for the specified clustering and cluster.
Abstract base class to access the results of proxy / center based clustering algorithms.
virtual unsigned int size_of_solution(unsigned int index) const =0
returns the size of a particular solution
virtual unsigned int number_of_solutions() const =0
returns the number of available solutions
virtual std::vector< T * > discrete_proxies(unsigned int solutionIndex) const =0
Returns a vector of pointers to the proxies for the specified clustering.
Abstract base class for algorithm solutions.