BICO 1.1

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Pages
partitionprovider.h
Go to the documentation of this file.
1 #ifndef PARTITIONPROVIDER_H
2 #define PARTITIONPROVIDER_H
3
4 #include "../base/solutionprovider.h"
5
6 #include <vector>
7
8 namespace CluE
9 {
10
16 template<typename T> class PartitionProvider
17 {
18 public:
19
20 virtual ~PartitionProvider()
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
44 virtual unsigned int clustersize(unsigned int solutionIndex, unsigned int partitionIndex) const = 0;
45
49 virtual T* element(unsigned int solutionIndex, unsigned int partitionIndex, unsigned int elementIndex) const = 0;
50
55 virtual std::vector<T*> cluster(unsigned int solutionIndex, unsigned int partitionIndex) const = 0;
56
60 virtual std::vector<std::vector<T*> > clustering(unsigned int solutionIndex) const = 0;
61
66 static PartitionProvider<T>* toPartitionProvider(SolutionProvider* s)
67 {
68 return dynamic_cast<PartitionProvider<T>*>(s);
69 }
70 };
71
72 }
73
74 #endif
CluE::PartitionProvider::element
virtual T * element(unsigned int solutionIndex, unsigned int partitionIndex, unsigned int elementIndex) const =0
Returns a pointer to a particular element from the specified cluster and clustering.
CluE::PartitionProvider::cluster
virtual std::vector< T * > cluster(unsigned int solutionIndex, unsigned int partitionIndex) const =0
Returns a vector of pointers to the elements of a particular cluster from the specified clustering...
CluE::PartitionProvider::toPartitionProvider
static PartitionProvider< T > * toPartitionProvider(SolutionProvider *s)
Does a dynamic cast of the given SolutionProvider to a PartitionProvider.
Definition: partitionprovider.h:66
CluE::PartitionProvider::clustering
virtual std::vector< std::vector< T * > > clustering(unsigned int solutionIndex) const =0
Returns the specified clustering as a vector of vector of pointers to the elements.
CluE::PartitionProvider
Abstract base class to access results of partition based clustering algorithms.
Definition: partitionprovider.h:16
CluE::PartitionProvider::number_of_solutions
virtual unsigned int number_of_solutions() const =0
returns the number of available solutions
CluE::PartitionProvider::~PartitionProvider
virtual ~PartitionProvider()
Definition: partitionprovider.h:20
CluE::PartitionProvider::size_of_solution
virtual unsigned int size_of_solution(unsigned int index) const =0
returns the size of a particular solution
CluE::PartitionProvider::clustersize
virtual unsigned int clustersize(unsigned int solutionIndex, unsigned int partitionIndex) const =0
Returns the cardinality of the specified cluster from the computed clustering.
CluE::SolutionProvider
Abstract base class for algorithm solutions.
Definition: solutionprovider.h:16