xapian-core  1.5.1
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.
ClusterSetoperator= (const ClusterSet &other)
 Assignment is allowed.
 ClusterSet (ClusterSet &&other)
 Move constructor.
ClusterSetoperator= (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 Clusteroperator[] (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
otherThe object to copy.

References ClusterSet().

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

◆ ClusterSet() [2/2]

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

Move constructor.

Parameters
otherThe 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
clusterCluster 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
pointPoint object which needs to be added to a Cluster within the ClusterSet
indexIndex 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
otherThe 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
otherThe object to copy.

References ClusterSet().


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