|
xapian-core
1.5.1
|
Class to represents a Cluster which contains Points and Centroid of the Cluster. More...
#include <cluster.h>
Public Member Functions | |
| Cluster (const Cluster &other) | |
| Copying is allowed. | |
| Cluster & | operator= (const Cluster &other) |
| Assignment is allowed. | |
| Cluster (Cluster &&other) | |
| Move constructor. | |
| Cluster & | operator= (Cluster &&other) |
| Move assignment operator. | |
| Cluster (const Centroid ¢roid) | |
| Constructor. | |
| Cluster () | |
| Default constructor. | |
| ~Cluster () | |
| Destructor. | |
| Xapian::doccount | size () const |
| Return size of the cluster. | |
| void | add_point (const Point &point) |
| Add a document to the Cluster. | |
| void | clear () |
| Clear the cluster weights. | |
| const Point & | operator[] (Xapian::doccount i) const |
| Return the point at the given index in the cluster. | |
| DocumentSet | get_documents () const |
| Return the documents that are contained within the cluster. | |
| const Centroid & | get_centroid () const |
| Return the current centroid of the cluster. | |
| void | set_centroid (const Centroid ¢roid) |
| Set the centroid of the Cluster to 'centroid'. | |
| void | recalculate () |
| Recalculate the centroid of the Cluster after each iteration of the KMeans algorithm by taking the mean of all document vectors (Points) that belong to the Cluster. | |
| Xapian::Cluster::Cluster | ( | const Cluster & | other | ) |
Copying is allowed.
The internals are reference counted, so copying is cheap.
| other | The object to copy. |
References Cluster().
Referenced by Cluster(), Cluster(), operator=(), and operator=().
| Xapian::Cluster::Cluster | ( | Cluster && | other | ) |
|
explicit |
Constructor.
| centroid | The centroid of the cluster object is assigned to 'centroid' |
| void Xapian::Cluster::add_point | ( | const Point & | point | ) |
Assignment is allowed.
The internals are reference counted, so assignment is cheap.
| other | The object to copy. |
References Cluster().
| void Xapian::Cluster::set_centroid | ( | const Centroid & | centroid | ) |