#include "KMeans.h"#include "KmTree.h"#include <mrpt/utils/mrpt_macros.h>#include <sstream>#include <time.h>#include <vector>
Go to the source code of this file.
Macros | |
| #define | LOG(verbose, text) |
Functions | |
| void | AddKMeansLogging (std::ostream *out, bool verbose) |
| void | ClearKMeansLogging () |
| static double | GetSeconds () |
| static void | RunKMeansOnce (const KmTree &tree, int n, int k, int d, Scalar *points, Scalar *centers, Scalar *min_cost, Scalar *max_cost, Scalar *total_cost, double start_time, double *min_time, double *max_time, double *total_time, Scalar *best_centers, int *best_assignment) |
| void | LogMetaStats (Scalar min_cost, Scalar max_cost, Scalar total_cost, double min_time, double max_time, double total_time, int num_attempts) |
| Scalar | RunKMeans (int n, int k, int d, Scalar *points, int attempts, Scalar *ret_centers, int *ret_assignment) |
| Scalar | RunKMeansPlusPlus (int n, int k, int d, Scalar *points, int attempts, Scalar *ret_centers, int *ret_assignment) |
Variables | |
| static vector< ostream * > | gLogOutputs |
| static vector< ostream * > | gVerboseLogOutputs |
| #define LOG | ( | verbose, | |
| text | |||
| ) |
Definition at line 25 of file kmeans++/KMeans.cpp.
Referenced by LogMetaStats(), RunKMeans(), RunKMeansOnce(), and RunKMeansPlusPlus().
| void AddKMeansLogging | ( | std::ostream * | out, |
| bool | verbose | ||
| ) |
Definition at line 34 of file kmeans++/KMeans.cpp.
References gLogOutputs, and gVerboseLogOutputs.
| void ClearKMeansLogging | ( | ) |
Definition at line 39 of file kmeans++/KMeans.cpp.
References gLogOutputs, and gVerboseLogOutputs.
|
static |
Definition at line 45 of file kmeans++/KMeans.cpp.
Referenced by RunKMeans(), RunKMeansOnce(), and RunKMeansPlusPlus().
| void LogMetaStats | ( | Scalar | min_cost, |
| Scalar | max_cost, | ||
| Scalar | total_cost, | ||
| double | min_time, | ||
| double | max_time, | ||
| double | total_time, | ||
| int | num_attempts | ||
| ) |
Definition at line 93 of file kmeans++/KMeans.cpp.
References LOG.
Referenced by RunKMeans(), and RunKMeansPlusPlus().
| Scalar RunKMeans | ( | int | n, |
| int | k, | ||
| int | d, | ||
| Scalar * | points, | ||
| int | attempts, | ||
| Scalar * | ret_centers, | ||
| int * | ret_assignment | ||
| ) |
Definition at line 103 of file kmeans++/KMeans.cpp.
References GetRandom(), GetSeconds(), KM_ASSERT, LOG, LogMetaStats(), mrpt::system::os::memcpy(), and RunKMeansOnce().
Referenced by mrpt::math::detail::internal_kmeans< double >(), and mrpt::math::detail::internal_kmeans< float >().
|
static |
Definition at line 53 of file kmeans++/KMeans.cpp.
References KmTree::DoKMeansStep(), GetSeconds(), LOG, mrpt::system::os::memcpy(), and MRPT_UNUSED_PARAM.
Referenced by RunKMeans(), and RunKMeansPlusPlus().
| Scalar RunKMeansPlusPlus | ( | int | n, |
| int | k, | ||
| int | d, | ||
| Scalar * | points, | ||
| int | attempts, | ||
| Scalar * | ret_centers, | ||
| int * | ret_assignment | ||
| ) |
Definition at line 152 of file kmeans++/KMeans.cpp.
References GetSeconds(), KM_ASSERT, LOG, LogMetaStats(), RunKMeansOnce(), and KmTree::SeedKMeansPlusPlus().
|
static |
Definition at line 23 of file kmeans++/KMeans.cpp.
Referenced by AddKMeansLogging(), and ClearKMeansLogging().
|
static |
Definition at line 24 of file kmeans++/KMeans.cpp.
Referenced by AddKMeansLogging(), and ClearKMeansLogging().
| Page generated by Doxygen 1.8.14 for MRPT 1.5.7 Git: 5902e14cc Wed Apr 24 15:04:01 2019 +0200 at lun oct 28 01:39:17 CET 2019 |