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

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

#include <cluster.h>

+ Collaboration diagram for Xapian::ClusterSet:

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. More...
 
 ~ClusterSet ()
 Destructor. More...
 
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. More...
 
const Clusteroperator[] (Xapian::doccount i) const
 Return the cluster at index 'i'. More...
 
void clear_clusters ()
 Clear all the clusters in the ClusterSet. More...
 
void recalculate_centroids ()
 Recalculate the centroid for all the clusters in the ClusterSet. More...
 

Private Attributes

Xapian::Internal::intrusive_ptr_nonnull< Internal > internal
 

Detailed Description

Class for storing the results returned by the Clusterer.

Definition at line 452 of file cluster.h.

Constructor & Destructor Documentation

◆ ClusterSet() [1/3]

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/3]

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

Move constructor.

Parameters
otherThe object to move.

◆ ClusterSet() [3/3]

Xapian::ClusterSet::ClusterSet ( )

Default constructor.

◆ ~ClusterSet()

Xapian::ClusterSet::~ClusterSet ( )

Destructor.

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

◆ clear_clusters()

void Xapian::ClusterSet::clear_clusters ( )

Clear all the clusters in the ClusterSet.

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

◆ operator[]()

const Cluster& Xapian::ClusterSet::operator[] ( Xapian::doccount  i) const

Return the cluster at index 'i'.

◆ recalculate_centroids()

void Xapian::ClusterSet::recalculate_centroids ( )

Recalculate the centroid for all the clusters in the ClusterSet.

◆ size()

Xapian::doccount Xapian::ClusterSet::size ( ) const

Return the number of clusters.

Member Data Documentation

◆ internal

Xapian::Internal::intrusive_ptr_nonnull<Internal> Xapian::ClusterSet::internal
private

Reference counted internals.

Definition at line 456 of file cluster.h.


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