Xapian::ClusterSet Class Reference

Class for storing the results returned by the Clusterer. More...

`#include <cluster.h>`

## Public Member Functions

| ClusterSet (const ClusterSet &other)
| Copying is allowed.
ClusterSet & | operator= (const ClusterSet &other)
| Assignment is allowed.
| ClusterSet (ClusterSet &&other)
| Move constructor.
ClusterSet & | operator= (ClusterSet &&other)
| Move assignment operator.
| ClusterSet ()
| Default constructor.
| ~ClusterSet ()
| Destructor.
void | add_cluster (const Cluster &cluster)
| Add a cluster to the ClusterSet.
void | add_to_cluster (const Point &point, unsigned int index)
| Add the point to the cluster at position 'index'.
Xapian::doccount | size () const
| Return the number of clusters.
const Cluster & | operator[] (Xapian::doccount i) const
| Return the cluster at index 'i'.
void | clear_clusters ()
| Clear all the clusters in the ClusterSet.
void | recalculate_centroids ()
| Recalculate the centroid for all the clusters in the ClusterSet.

## Detailed Description

Class for storing the results returned by the Clusterer.

## Constructor & Destructor Documentation

## ClusterSet() [1/2]

Xapian::ClusterSet::ClusterSet | ( | const ClusterSet & | other | ) |

Copying is allowed.

The internals are reference counted, so copying is cheap.

Parameters

  other | The object to copy.

References ClusterSet().

Referenced by ClusterSet(), ClusterSet(), operator=(), and operator=().

## ClusterSet() [2/2]

Xapian::ClusterSet::ClusterSet | ( | ClusterSet && | other | ) |

Move constructor.

Parameters

  other | The object to move.

References ClusterSet().

## Member Function Documentation

## add_cluster()

void Xapian::ClusterSet::add_cluster | ( | const Cluster & | cluster | ) |

Add a cluster to the ClusterSet.

Parameters

  cluster | Cluster object which is to be added to the ClusterSet

## add_to_cluster()

void Xapian::ClusterSet::add_to_cluster | ( | const Point & | point,
|  | unsigned int | index )

Add the point to the cluster at position 'index'.

Parameters

  point | Point object which needs to be added to a Cluster within the ClusterSet
  index | Index of the Cluster within the ClusterSet to which the Point is to be added

## operator=() [1/2]

ClusterSet & Xapian::ClusterSet::operator= | ( | ClusterSet && | other | ) |

Move assignment operator.

Parameters

  other | The object to move.

References ClusterSet().

## operator=() [2/2]

ClusterSet & Xapian::ClusterSet::operator= | ( | const ClusterSet & | other | ) |

Assignment is allowed.

The internals are reference counted, so assignment is cheap.

Parameters

  other | The object to copy.

References ClusterSet().

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

- xapian/cluster.h