1 #ifndef PROXYSOLUTION_H
2 #define PROXYSOLUTION_H
4 #include "../base/solutionprovider.h"
5 #include "../base/proxyprovider.h"
33 virtual T
proxy(
unsigned int n,
unsigned int c)
const;
34 virtual std::vector<T>
proxies(
unsigned int n)
const;
51 return this->proxysets.size();
56 if (i<this->proxysets.size())
57 return this->proxysets[i].size();
63 if (n<this->proxysets.size())
64 if (c<this->proxysets[n].size())
65 return this->proxysets[n][c];
67 std::cerr <<
"ProxySolution<T>::proxy(" << n <<
"," << c <<
"): requested proxy not available" << std::endl;
68 throw "ILLEGAL STATE";
73 if (n<this->proxysets.size())
74 return this->proxysets[n];
75 return std::vector<T>();
Abstract base class to access results of proxy / center based clustering algorithms.
std::vector< std::vector< T > > proxysets
virtual std::vector< T > proxies(unsigned int n) const
returns the proxies for the specified clustering
virtual T proxy(unsigned int n, unsigned int c) const
returns the proxy for the specified clustering and cluster
virtual double computationtime() const
returns the time needed for the last computation
virtual unsigned int number_of_solutions() const
returns the number of available solutions
Data structure for proxies.
virtual unsigned int size_of_solution(unsigned int) const
returns the size of a particular solution
Abstract base class for algorithm solutions.