CluE  1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
CluE::DiscreteDoubleSolution< T > Struct Template Reference

Data structure for partitions and discrete proxies. More...

#include <discretedoublesolution.h>

Inheritance diagram for CluE::DiscreteDoubleSolution< T >:
Inheritance graph
Collaboration diagram for CluE::DiscreteDoubleSolution< T >:
Collaboration graph

Public Member Functions

 DiscreteDoubleSolution ()
 
virtual ~DiscreteDoubleSolution ()
 
virtual double computationtime () const
 returns the time needed for the last computation More...
 
virtual unsigned int number_of_solutions () const
 returns the number of available solutions More...
 
virtual unsigned int size_of_solution (unsigned int) const
 returns the size of a particular solution More...
 
virtual T * discrete_proxy (unsigned int n, unsigned int c) const
 Returns a pointer to the proxy for the specified clustering and cluster. More...
 
virtual std::vector< T * > discrete_proxies (unsigned int n) const
 Returns a vector of pointers to the proxies for the specified clustering. More...
 
virtual unsigned int clustersize (unsigned int, unsigned int) const
 Returns the cardinality of the specified cluster from the computed clustering. More...
 
virtual T * element (unsigned int, unsigned int, unsigned int) const
 Returns a pointer to a particular element from the specified cluster and clustering. More...
 
virtual std::vector< T * > cluster (unsigned int, unsigned int) const
 Returns a vector of pointers to the elements of a particular cluster from the specified clustering. More...
 
virtual std::vector
< std::vector< T * > > 
clustering (unsigned int) const
 Returns the specified clustering as a vector of vector of pointers to the elements. More...
 
- Public Member Functions inherited from CluE::SolutionProvider
virtual ~SolutionProvider ()
 
- Public Member Functions inherited from CluE::DiscreteProxyProvider< T >
virtual ~DiscreteProxyProvider ()
 
- Public Member Functions inherited from CluE::PartitionProvider< T >
virtual ~PartitionProvider ()
 

Public Attributes

double seconds
 
std::vector< std::vector< T * > > proxysets
 
std::vector< std::vector
< std::vector< T * > > > 
partitions
 

Additional Inherited Members

- Static Public Member Functions inherited from CluE::DiscreteProxyProvider< T >
static DiscreteProxyProvider< T > * toDiscreteProxyProvider (SolutionProvider *s)
 Does a dynamic cast of the given SolutionProvider to a DiscreteProxyProvider. More...
 
- Static Public Member Functions inherited from CluE::PartitionProvider< T >
static PartitionProvider< T > * toPartitionProvider (SolutionProvider *s)
 Does a dynamic cast of the given SolutionProvider to a PartitionProvider. More...
 

Detailed Description

template<typename T>
struct CluE::DiscreteDoubleSolution< T >

Data structure for partitions and discrete proxies.

This struct is for use in algorithms computing partitions and discrete proxies.

Definition at line 22 of file discretedoublesolution.h.

Constructor & Destructor Documentation

template<typename T >
CluE::DiscreteDoubleSolution< T >::DiscreteDoubleSolution ( )

Definition at line 49 of file discretedoublesolution.h.

template<typename T>
virtual CluE::DiscreteDoubleSolution< T >::~DiscreteDoubleSolution ( )
inlinevirtual

Definition at line 28 of file discretedoublesolution.h.

Member Function Documentation

template<typename T >
double CluE::DiscreteDoubleSolution< T >::computationtime ( ) const
virtual

returns the time needed for the last computation

Returns
time in seconds needed for last call to compute()

Implements CluE::SolutionProvider.

Definition at line 53 of file discretedoublesolution.h.

template<typename T >
unsigned int CluE::DiscreteDoubleSolution< T >::number_of_solutions ( ) const
virtual

returns the number of available solutions

The algorthm may compute more than one solution of possibly different size, where size means number of computed clusters, proxies (e.g. cluster centers) or the size of a coreset. The sizes can be retrieved by a call to size_of_solution().

Implements CluE::DiscreteProxyProvider< T >.

Definition at line 58 of file discretedoublesolution.h.

template<typename T >
unsigned int CluE::DiscreteDoubleSolution< T >::size_of_solution ( unsigned  index) const
virtual

returns the size of a particular solution

Parameters
indexnumber between 0 and number_of_solutions()-1
Returns
the size for the requested clustering

Implements CluE::DiscreteProxyProvider< T >.

Definition at line 65 of file discretedoublesolution.h.

template<typename T >
T * CluE::DiscreteDoubleSolution< T >::discrete_proxy ( unsigned int  solutionIndex,
unsigned int  proxyIndex 
) const
virtual

Returns a pointer to the proxy for the specified clustering and cluster.

Returns a pointer to the element of the input set that was computed to be the proxy for cluster number proxyIndex in clustering number solutionIndex.

Implements CluE::DiscreteProxyProvider< T >.

Definition at line 76 of file discretedoublesolution.h.

template<typename T >
std::vector< T * > CluE::DiscreteDoubleSolution< T >::discrete_proxies ( unsigned int  solutionIndex) const
virtual

Returns a vector of pointers to the proxies for the specified clustering.

Returns a vector of pointers to the elements of the input set that were computed to be the proxies for clustering number proxyIndex.

Implements CluE::DiscreteProxyProvider< T >.

Definition at line 84 of file discretedoublesolution.h.

template<typename T >
unsigned int CluE::DiscreteDoubleSolution< T >::clustersize ( unsigned  solutionIndex,
unsigned  partitionIndex 
) const
virtual

Returns the cardinality of the specified cluster from the computed clustering.

Implements CluE::PartitionProvider< T >.

Definition at line 91 of file discretedoublesolution.h.

template<typename T >
T * CluE::DiscreteDoubleSolution< T >::element ( unsigned  solutionIndex,
unsigned  partitionIndex,
unsigned  elementIndex 
) const
virtual

Returns a pointer to a particular element from the specified cluster and clustering.

Implements CluE::PartitionProvider< T >.

Definition at line 99 of file discretedoublesolution.h.

template<typename T >
std::vector< T * > CluE::DiscreteDoubleSolution< T >::cluster ( unsigned  solutionIndex,
unsigned  partitionIndex 
) const
virtual

Returns a vector of pointers to the elements of a particular cluster from the specified clustering.

Implements CluE::PartitionProvider< T >.

Definition at line 108 of file discretedoublesolution.h.

template<typename T >
std::vector< std::vector< T * > > CluE::DiscreteDoubleSolution< T >::clustering ( unsigned  solutionIndex) const
virtual

Returns the specified clustering as a vector of vector of pointers to the elements.

Implements CluE::PartitionProvider< T >.

Definition at line 116 of file discretedoublesolution.h.

Member Data Documentation

template<typename T>
double CluE::DiscreteDoubleSolution< T >::seconds

Definition at line 44 of file discretedoublesolution.h.

template<typename T>
std::vector<std::vector<T*> > CluE::DiscreteDoubleSolution< T >::proxysets

Definition at line 45 of file discretedoublesolution.h.

template<typename T>
std::vector<std::vector<std::vector<T*> > > CluE::DiscreteDoubleSolution< T >::partitions

Definition at line 46 of file discretedoublesolution.h.


The documentation for this struct was generated from the following file: