Main MRPT website > C++ reference for MRPT 1.5.9
List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
KmTree Class Reference

Detailed Description

Definition at line 35 of file KmTree.h.

#include <math/kmeans++/KmTree.h>


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

NodeBuildNodes (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_
char * node_data_
int * point_indices_

Constructor & Destructor Documentation

◆ KmTree()

KmTree::KmTree ( int  n,
int  d,
Scalar points 

◆ ~KmTree()

KmTree::~KmTree ( )

Definition at line 49 of file KmTree.cpp.

References node_data_, and point_indices_.

Member Function Documentation

◆ BuildNodes()

KmTree::Node * KmTree::BuildNodes ( Scalar points,
int  first_index,
int  last_index,
char **  next_node_data 

◆ DoKMeansStep()

Scalar KmTree::DoKMeansStep ( int  k,
Scalar centers,
int *  assignment 
) const

◆ DoKMeansStepAtNode()

Scalar KmTree::DoKMeansStepAtNode ( const Node node,
int  k,
int *  candidates,
Scalar centers,
Scalar sums,
int *  counts,
int *  assignment 
) const

◆ GetNodeCost()

Scalar KmTree::GetNodeCost ( const Node node,
Scalar center 
) const

◆ SeedKMeansPlusPlus()

Scalar KmTree::SeedKMeansPlusPlus ( int  k,
Scalar centers 
) const

◆ SeedKmppSetClusterIndex()

void KmTree::SeedKmppSetClusterIndex ( const Node node,
int  index 
) const

◆ SeedKmppUpdateAssignment()

Scalar KmTree::SeedKmppUpdateAssignment ( const Node node,
int  new_cluster,
Scalar centers,
Scalar dist_sq 
) const

◆ ShouldBePruned()

bool KmTree::ShouldBePruned ( Scalar box_median,
Scalar box_radius,
Scalar centers,
int  best_index,
int  test_index 
) const

Definition at line 273 of file KmTree.cpp.

References d_.

Referenced by DoKMeansStepAtNode(), and SeedKmppUpdateAssignment().

Member Data Documentation

◆ d_

int KmTree::d_

◆ n_

int KmTree::n_

Definition at line 78 of file KmTree.h.

Referenced by SeedKMeansPlusPlus().

◆ node_data_

char* KmTree::node_data_

Definition at line 81 of file KmTree.h.

Referenced by KmTree(), and ~KmTree().

◆ point_indices_

int* KmTree::point_indices_

◆ points_

Scalar* KmTree::points_

Definition at line 79 of file KmTree.h.

Referenced by SeedKMeansPlusPlus(), and SeedKmppUpdateAssignment().

◆ top_node_

Node* KmTree::top_node_

Definition at line 80 of file KmTree.h.

Referenced by DoKMeansStep(), KmTree(), and SeedKMeansPlusPlus().

Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020