xapian-core  1.5.0
Public Member Functions | List of all members
Xapian::ClusterSet Class Reference

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

Public Member Functions

 ClusterSet (const ClusterSet &other)
 Copying is allowed. More...
 
ClusterSetoperator= (const ClusterSet &other)
 Assignment is allowed. More...
 
 ClusterSet (ClusterSet &&other)
 Move constructor. More...
 
ClusterSetoperator= (ClusterSet &&other)
 Move assignment operator. More...
 
 ClusterSet ()
 Default constructor.
 
 ~ClusterSet ()
 Destructor.
 
void add_cluster (const Cluster &cluster)
 Add a cluster to the ClusterSet. More...
 
void add_to_cluster (const Point &point, unsigned int index)
 Add the point to the cluster at position 'index'. More...
 
Xapian::doccount size () const
 Return the number of clusters.
 
Clusteroperator[] (Xapian::doccount i)
 Return the cluster at index 'i'.
 
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.

◆ ClusterSet() [2/2]

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

Move constructor.

Parameters
otherThe object to move.

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.

◆ 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.

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