Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

qgar::GenCluster< T > Class Template Reference
[Classification]

#include <GenKMeans.H>

List of all members.


Detailed Description

template<class T>
class qgar::GenCluster< T >

A cluster, as generated by the k-means algorithm implemented by class qgar::GenKMeans.

Author:
Jan Rendek
Date:
Apr 2, 2004 08:36
Since:
Qgar 2.1.1

Definition at line 76 of file GenKMeans.H.

Public Types

Types
typedef T value_type
 Type of the cluster elements.
typedef value_typereference
 Reference to qgar::GenCluster::value_type.
typedef const value_typeconst_reference
 Constant reference to qgar::GenCluster::value_type.
typedef value_typepointer
 Pointer to qgar::GenImage::value_type.
typedef const value_typeconst_pointer
 Constant pointer to qgar::GenCluster::value_type.

Public Member Functions

Constructors
 GenCluster (const std::vector< value_type > &elements, const_reference center)
 Builds a cluster.
 GenCluster (const GenCluster &other)
 Copy constructor.
Operators
GenClusteroperator= (const GenCluster &rhs)
 Assignment operator.
Access
size_t size () const
 Retrieves the size of the cluster.
const_reference center () const
 Retrieves the center of the cluster.
const std::vector< value_type > & elements () const
 Retrieves the elements composing the cluster.

Private Attributes

Cluster features
value_type _center
 The center of the cluster.
std::vector< value_type_elements
 The elements of the cluster.


Member Typedef Documentation

template<class T>
typedef const value_type* qgar::GenCluster< T >::const_pointer
 

Constant pointer to qgar::GenCluster::value_type.

Definition at line 110 of file GenKMeans.H.

template<class T>
typedef const value_type& qgar::GenCluster< T >::const_reference
 

Constant reference to qgar::GenCluster::value_type.

Definition at line 100 of file GenKMeans.H.

template<class T>
typedef value_type* qgar::GenCluster< T >::pointer
 

Pointer to qgar::GenImage::value_type.

Definition at line 105 of file GenKMeans.H.

template<class T>
typedef value_type& qgar::GenCluster< T >::reference
 

Reference to qgar::GenCluster::value_type.

Definition at line 95 of file GenKMeans.H.

template<class T>
typedef T qgar::GenCluster< T >::value_type
 

Type of the cluster elements.

Definition at line 90 of file GenKMeans.H.


Constructor & Destructor Documentation

template<class T>
qgar::GenCluster< T >::GenCluster const std::vector< value_type > &  elements,
const_reference  center
 

Builds a cluster.

Parameters:
elements the elements of the cluster
center the center of the cluster

Definition at line 70 of file GenKMeans.TCC.

template<class T>
qgar::GenCluster< T >::GenCluster const GenCluster< T > &  other  ) 
 

Copy constructor.

Parameters:
other the instance to be copied


Member Function Documentation

template<class T>
const T & qgar::GenCluster< T >::center  )  const [inline]
 

Retrieves the center of the cluster.

Returns:
the center of the cluster

Definition at line 126 of file GenKMeans.TCC.

References qgar::GenCluster< T >::_center.

template<class T>
const std::vector< T > & qgar::GenCluster< T >::elements  )  const [inline]
 

Retrieves the elements composing the cluster.

Returns:
a reference to the vector containing the elements of this cluster

Definition at line 134 of file GenKMeans.TCC.

References qgar::GenCluster< T >::_elements.

template<class T>
GenCluster& qgar::GenCluster< T >::operator= const GenCluster< T > &  rhs  ) 
 

Assignment operator.

Parameters:
rhs The rhs part of the assignment

template<class T>
size_t qgar::GenCluster< T >::size  )  const [inline]
 

Retrieves the size of the cluster.

Returns:
The size of the cluster

Definition at line 118 of file GenKMeans.TCC.

References qgar::GenCluster< T >::_elements.


Member Data Documentation

template<class T>
value_type qgar::GenCluster< T >::_center [private]
 

The center of the cluster.

Definition at line 196 of file GenKMeans.H.

Referenced by qgar::GenCluster< T >::center().

template<class T>
std::vector<value_type> qgar::GenCluster< T >::_elements [private]
 

The elements of the cluster.

Definition at line 201 of file GenKMeans.H.

Referenced by qgar::GenCluster< T >::elements(), and qgar::GenCluster< T >::size().


The documentation for this class was generated from the following files: