Class to represents a Cluster which contains Points and Centroid of the Cluster.
More...
#include <cluster.h>
Class to represents a Cluster which contains Points and Centroid of the Cluster.
Definition at line 370 of file cluster.h.
◆ Cluster() [1/4]
| Xapian::Cluster::Cluster |
( |
const Cluster & |
other | ) |
|
Copying is allowed.
The internals are reference counted, so copying is cheap.
- Parameters
-
◆ Cluster() [2/4]
| Xapian::Cluster::Cluster |
( |
Cluster && |
other | ) |
|
Move constructor.
- Parameters
-
◆ Cluster() [3/4]
| Xapian::Cluster::Cluster |
( |
const Centroid & |
centroid | ) |
|
|
explicit |
Constructor.
- Parameters
-
| centroid | The centroid of the cluster object is assigned to 'centroid' |
◆ Cluster() [4/4]
| Xapian::Cluster::Cluster |
( |
| ) |
|
◆ ~Cluster()
| Xapian::Cluster::~Cluster |
( |
| ) |
|
◆ add_point()
| void Xapian::Cluster::add_point |
( |
const Point & |
point | ) |
|
Add a document to the Cluster.
- Parameters
-
| point | The Point object representing the document which needs to be added to the cluster |
◆ clear()
| void Xapian::Cluster::clear |
( |
| ) |
|
Clear the cluster weights.
◆ get_centroid()
| const Centroid& Xapian::Cluster::get_centroid |
( |
| ) |
const |
Return the current centroid of the cluster.
◆ get_documents()
Return the documents that are contained within the cluster.
◆ operator=() [1/2]
Move assignment operator.
- Parameters
-
◆ operator=() [2/2]
Assignment is allowed.
The internals are reference counted, so assignment is cheap.
- Parameters
-
◆ operator[]()
Return the point at the given index in the cluster.
◆ recalculate()
| void Xapian::Cluster::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.
◆ set_centroid()
| void Xapian::Cluster::set_centroid |
( |
const Centroid & |
centroid | ) |
|
Set the centroid of the Cluster to 'centroid'.
- Parameters
-
◆ size()
Return size of the cluster.
◆ internal
Reference counted internals.
Definition at line 374 of file cluster.h.
The documentation for this class was generated from the following file: