MRPT  2.0.4
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 82 of file KmUtils.h.

◆ KM_ASSERT

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

Typedef Documentation

◆ Scalar

using Scalar = double

Definition at line 43 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 100 of file KmUtils.h.

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

Here is the caller graph for this function:

◆ PointAdd()

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

Definition at line 61 of file KmUtils.h.

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

Here is the caller graph for this function:

◆ PointAllocate()

Scalar* PointAllocate ( int  d)
inline

Definition at line 49 of file KmUtils.h.

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

Here is the caller graph for this function:

◆ PointCopy()

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

Definition at line 55 of file KmUtils.h.

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

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PointDistSq()

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

Definition at line 71 of file KmUtils.h.

Referenced by KmTree::DoKMeansStepAtNode(), KmTree::SeedKMeansPlusPlus(), and KmTree::SeedKmppUpdateAssignment().

Here is the caller graph for this function:

◆ PointFree()

void PointFree ( Scalar p)
inline

Definition at line 54 of file KmUtils.h.

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

Here is the caller graph for this function:

◆ PointScale()

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

Definition at line 66 of file KmUtils.h.

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

Here is the caller graph for this function:



Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020