Main MRPT website > C++ reference for MRPT 1.9.9
Macros | Typedefs | Functions
KmUtils.h File Reference
#include <mrpt/config.h>
#include <memory.h>
#include <cstdlib>
Include dependency graph for KmUtils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ENABLE_KMEANS_ASSERTS
 
#define KM_ASSERT(expression)   (void)((expression) != 0 ? 0 : __KMeansAssertionFailure(__FILE__, __LINE__, #expression))
 

Typedefs

using Scalar = double
 

Functions

ScalarPointAllocate (int d)
 
void PointFree (Scalar *p)
 
void PointCopy (Scalar *p1, const Scalar *p2, int d)
 
void PointAdd (Scalar *p1, const Scalar *p2, int d)
 
void PointScale (Scalar *p, Scalar scale, int d)
 
Scalar PointDistSq (const Scalar *p1, const Scalar *p2, int d)
 
int __KMeansAssertionFailure (const char *file, int line, const char *expression)
 
int GetRandom (int n)
 

Macro Definition Documentation

◆ ENABLE_KMEANS_ASSERTS

#define ENABLE_KMEANS_ASSERTS

Definition at line 83 of file KmUtils.h.

◆ KM_ASSERT

#define KM_ASSERT (   expression)    (void)((expression) != 0 ? 0 : __KMeansAssertionFailure(__FILE__, __LINE__, #expression))

Definition at line 87 of file KmUtils.h.

Typedef Documentation

◆ Scalar

using Scalar = double

Definition at line 44 of file KmUtils.h.

Function Documentation

◆ __KMeansAssertionFailure()

int __KMeansAssertionFailure ( const char *  file,
int  line,
const char *  expression 
)

Definition at line 17 of file KmUtils.cpp.

◆ GetRandom()

int GetRandom ( int  n)
inline

Definition at line 101 of file KmUtils.h.

Referenced by RunKMeans(), and KmTree::SeedKMeansPlusPlus().

◆ PointAdd()

void PointAdd ( Scalar p1,
const Scalar p2,
int  d 
)
inline

Definition at line 62 of file KmUtils.h.

Referenced by KmTree::BuildNodes(), and KmTree::DoKMeansStepAtNode().

◆ PointAllocate()

Scalar* PointAllocate ( int  d)
inline

Definition at line 50 of file KmUtils.h.

Referenced by KmTree::BuildNodes(), KmTree::DoKMeansStep(), and KmTree::KmTree().

◆ PointCopy()

void PointCopy ( Scalar p1,
const Scalar p2,
int  d 
)
inline

Definition at line 56 of file KmUtils.h.

References mrpt::system::os::memcpy().

Referenced by KmTree::BuildNodes(), KmTree::DoKMeansStep(), and KmTree::KmTree().

◆ PointDistSq()

Scalar PointDistSq ( const Scalar p1,
const Scalar p2,
int  d 
)
inline

◆ PointFree()

void PointFree ( Scalar p)
inline

Definition at line 55 of file KmUtils.h.

Referenced by KmTree::BuildNodes(), KmTree::DoKMeansStep(), and KmTree::KmTree().

◆ PointScale()

void PointScale ( Scalar p,
Scalar  scale,
int  d 
)
inline

Definition at line 67 of file KmUtils.h.

Referenced by KmTree::BuildNodes(), and KmTree::DoKMeansStep().




Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST