MRPT
1.9.9
|
#include <kmeans++/KmTree.h>
Classes | |
struct | Node |
Public Member Functions | |
KmTree (int n, int d, Scalar *points) | |
~KmTree () | |
Scalar | DoKMeansStep (int k, Scalar *centers, int *assignment) const |
Scalar | SeedKMeansPlusPlus (int k, Scalar *centers) const |
Private Member Functions | |
Node * | BuildNodes (Scalar *points, int first_index, int last_index, char **next_node_data) |
Scalar | GetNodeCost (const Node *node, Scalar *center) const |
Scalar | DoKMeansStepAtNode (const Node *node, int k, int *candidates, Scalar *centers, Scalar *sums, int *counts, int *assignment) const |
bool | ShouldBePruned (Scalar *box_median, Scalar *box_radius, Scalar *centers, int best_index, int test_index) const |
void | SeedKmppSetClusterIndex (const Node *node, int index) const |
Scalar | SeedKmppUpdateAssignment (const Node *node, int new_cluster, Scalar *centers, Scalar *dist_sq) const |
Private Attributes | |
int | n_ |
int | d_ |
Scalar * | points_ |
Node * | top_node_ |
char * | node_data_ |
int * | point_indices_ |
KmTree::KmTree | ( | int | n, |
int | d, | ||
Scalar * | points | ||
) |
Definition at line 19 of file KmTree.cpp.
References BuildNodes(), d_, KM_ASSERT, node_data_, point_indices_, PointAllocate(), PointCopy(), PointFree(), and top_node_.
KmTree::~KmTree | ( | ) |
Definition at line 52 of file KmTree.cpp.
References node_data_, and point_indices_.
|
private |
Definition at line 106 of file KmTree.cpp.
References d_, KmTree::Node::first_point_index, GetNodeCost(), KM_ASSERT, KmTree::Node::lower_node, KmTree::Node::median, KmTree::Node::num_points, KmTree::Node::opt_cost, point_indices_, PointAdd(), PointAllocate(), PointCopy(), PointFree(), PointScale(), KmTree::Node::radius, KmTree::Node::sum, and KmTree::Node::upper_node.
Referenced by KmTree().
Definition at line 58 of file KmTree.cpp.
References d_, DoKMeansStepAtNode(), KM_ASSERT, mrpt::system::os::memcpy(), PointAllocate(), PointCopy(), PointFree(), PointScale(), and top_node_.
Referenced by RunKMeansOnce().
|
private |
Definition at line 252 of file KmTree.cpp.
References d_, KmTree::Node::first_point_index, GetNodeCost(), KM_ASSERT, KmTree::Node::lower_node, KmTree::Node::median, KmTree::Node::num_points, point_indices_, PointAdd(), PointDistSq(), KmTree::Node::radius, ShouldBePruned(), KmTree::Node::sum, and KmTree::Node::upper_node.
Referenced by DoKMeansStep().
Definition at line 231 of file KmTree.cpp.
References d_, KmTree::Node::num_points, KmTree::Node::opt_cost, and KmTree::Node::sum.
Referenced by BuildNodes(), DoKMeansStepAtNode(), and SeedKmppUpdateAssignment().
Definition at line 346 of file KmTree.cpp.
References d_, GetRandom(), KM_ASSERT, mrpt::system::os::memcpy(), n_, point_indices_, PointDistSq(), points_, SeedKmppSetClusterIndex(), SeedKmppUpdateAssignment(), and top_node_.
Referenced by RunKMeansPlusPlus().
|
private |
Definition at line 392 of file KmTree.cpp.
References KmTree::Node::kmpp_cluster_index, KmTree::Node::lower_node, and KmTree::Node::upper_node.
Referenced by SeedKMeansPlusPlus(), and SeedKmppUpdateAssignment().
|
private |
Definition at line 402 of file KmTree.cpp.
References d_, KmTree::Node::first_point_index, GetNodeCost(), KmTree::Node::kmpp_cluster_index, KmTree::Node::lower_node, KmTree::Node::median, KmTree::Node::num_points, point_indices_, PointDistSq(), points_, KmTree::Node::radius, SeedKmppSetClusterIndex(), ShouldBePruned(), and KmTree::Node::upper_node.
Referenced by SeedKMeansPlusPlus().
|
private |
Definition at line 325 of file KmTree.cpp.
References d_.
Referenced by DoKMeansStepAtNode(), and SeedKmppUpdateAssignment().
|
private |
Definition at line 99 of file KmTree.h.
Referenced by BuildNodes(), DoKMeansStep(), DoKMeansStepAtNode(), GetNodeCost(), KmTree(), SeedKMeansPlusPlus(), SeedKmppUpdateAssignment(), and ShouldBePruned().
|
private |
Definition at line 99 of file KmTree.h.
Referenced by SeedKMeansPlusPlus().
|
private |
|
private |
Definition at line 103 of file KmTree.h.
Referenced by BuildNodes(), DoKMeansStepAtNode(), KmTree(), SeedKMeansPlusPlus(), SeedKmppUpdateAssignment(), and ~KmTree().
|
private |
Definition at line 100 of file KmTree.h.
Referenced by SeedKMeansPlusPlus(), and SeedKmppUpdateAssignment().
|
private |
Definition at line 101 of file KmTree.h.
Referenced by DoKMeansStep(), KmTree(), and SeedKMeansPlusPlus().
Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: c7a3bec24 Sun Mar 29 18:33:13 2020 +0200 at dom mar 29 18:50:38 CEST 2020 |