Main MRPT website > C++ reference
MRPT logo
Namespaces | Classes | Typedefs | Functions | Variables
mrpt::mrpt::utils Namespace Reference

Namespaces

 detail
 

Classes

struct  CProfilerProxy
 
class  PointCloudAdapter
 An adapter to different kinds of point cloud object. More...
 

Typedefs

typedef unsigned long POINTER_TYPE
 For performing type casting from a pointer to its numeric value. More...
 
typedef uint64_t TNodeID
 The type for node IDs in graphs of different types. More...
 
typedef std::pair< TNodeID, TNodeIDTPairNodeIDs
 A pair of node IDs. More...
 

Functions

template<class T >
square (const T x)
 Inline function for the square of a number. More...
 
void BASE_IMPEXP global_profiler_enter (const char *func_name) MRPT_NO_THROWS
 
void BASE_IMPEXP global_profiler_leave (const char *func_name) MRPT_NO_THROWS
 
double DEG2RAD (const double x)
 Degrees to radians. More...
 
float DEG2RAD (const float x)
 Degrees to radians. More...
 
float DEG2RAD (const int x)
 Degrees to radians. More...
 
double RAD2DEG (const double x)
 Radians to degrees. More...
 
float RAD2DEG (const float x)
 Radians to degrees. More...
 
template<typename T >
int sign (T x)
 Returns the sign of X as "1" or "-1". More...
 
template<typename T >
int signWithZero (T x)
 Returns the sign of X as "0", "1" or "-1". More...
 
template<typename T >
int round (const T value)
 Returns the closer integer (int) to x. More...
 
template<typename T >
long round_long (const T value)
 Returns the closer integer (long) to x. More...
 
template<typename T >
abs_diff (const T a, const T b)
 Efficient and portable evaluation of the absolute difference of two unsigned integer values (but will also work for signed and floating point types) More...
 
template<typename T >
const T min3 (const T &A, const T &B, const T &C)
 
template<typename T >
const T max3 (const T &A, const T &B, const T &C)
 
template<typename T >
int fix (T x)
 Rounds toward zero. More...
 
template<class R , class P >
R * getAs (stlplus::smart_ptr_clone< P > &o)
 Utility to get a cast'ed pointer from a smart pointer. More...
 
template<class R , class P >
const R * getAs (const stlplus::smart_ptr_clone< P > &o)
 Utility to get a cast'ed pointer from a smart pointer. More...
 
template<class T >
void reverseBytesInPlace (T &v_in_out)
 Reverse the order of the bytes of a given type (useful for transforming btw little/big endian) More...
 
template<class T >
void reverseBytes (const T &v_in, T &v_out)
 Reverse the order of the bytes of a given type (useful for transforming btw little/big endian) More...
 
template<typename T , typename K >
void keep_min (T &var, const K test_val)
 If the second argument is below the first one, set the first argument to this lower value. More...
 
template<typename T , typename K >
void keep_max (T &var, const K test_val)
 If the second argument is above the first one, set the first argument to this higher value. More...
 
template<class T >
void delete_safe (T *&ptr)
 Calls "delete" to free an object only if the pointer is not NULL, then set the pointer to NULL. More...
 
template<class T >
void vector_strong_clear (std::vector< T > &v)
 Like calling a std::vector<>'s clear() method, but really forcing deallocating the memory. More...
 

Variables

class BASE_IMPEXP CStream
 

Typedef Documentation

◆ POINTER_TYPE

typedef unsigned long mrpt::mrpt::utils::POINTER_TYPE

For performing type casting from a pointer to its numeric value.

Definition at line 134 of file CColouredPointsMap.h.

◆ TNodeID

typedef uint64_t mrpt::mrpt::utils::TNodeID

The type for node IDs in graphs of different types.

Definition at line 137 of file CColouredPointsMap.h.

◆ TPairNodeIDs

A pair of node IDs.

Definition at line 138 of file CColouredPointsMap.h.

Function Documentation

◆ abs_diff()

template<typename T >
T mrpt::mrpt::utils::abs_diff ( const T  a,
const T  b 
)
inline

Efficient and portable evaluation of the absolute difference of two unsigned integer values (but will also work for signed and floating point types)

Definition at line 145 of file CColouredPointsMap.h.

◆ DEG2RAD() [1/3]

double mrpt::mrpt::utils::DEG2RAD ( const double  x)
inline

Degrees to radians.

Definition at line 73 of file CColouredPointsMap.h.

◆ DEG2RAD() [2/3]

float mrpt::mrpt::utils::DEG2RAD ( const float  x)
inline

Degrees to radians.

Definition at line 75 of file CColouredPointsMap.h.

◆ DEG2RAD() [3/3]

float mrpt::mrpt::utils::DEG2RAD ( const int  x)
inline

Degrees to radians.

Definition at line 77 of file CColouredPointsMap.h.

◆ delete_safe()

template<class T >
void mrpt::mrpt::utils::delete_safe ( T *&  ptr)

◆ fix()

template<typename T >
int mrpt::mrpt::utils::fix ( x)
inline

Rounds toward zero.

Definition at line 154 of file CColouredPointsMap.h.

◆ getAs() [1/2]

template<class R , class P >
R* mrpt::mrpt::utils::getAs ( stlplus::smart_ptr_clone< P > &  o)
inline

Utility to get a cast'ed pointer from a smart pointer.

Definition at line 162 of file CColouredPointsMap.h.

◆ getAs() [2/2]

template<class R , class P >
const R* mrpt::mrpt::utils::getAs ( const stlplus::smart_ptr_clone< P > &  o)
inline

Utility to get a cast'ed pointer from a smart pointer.

Definition at line 166 of file CColouredPointsMap.h.

◆ global_profiler_enter()

void BASE_IMPEXP mrpt::mrpt::utils::global_profiler_enter ( const char *  func_name)

◆ global_profiler_leave()

void BASE_IMPEXP mrpt::mrpt::utils::global_profiler_leave ( const char *  func_name)

◆ keep_max()

template<typename T , typename K >
void mrpt::mrpt::utils::keep_max ( T &  var,
const K  test_val 
)
inline

◆ keep_min()

template<typename T , typename K >
void mrpt::mrpt::utils::keep_min ( T &  var,
const K  test_val 
)
inline

If the second argument is below the first one, set the first argument to this lower value.

Definition at line 185 of file CColouredPointsMap.h.

Referenced by mrpt::math::minimum(), mrpt::math::minimum_maximum(), mrpt::srba::LandmarkRendererBase< landmark_rendering_as_point >::render(), and mrpt::opengl::CGeneralizedEllipsoidTemplate< 3 >::render_dl().

◆ max3()

template<typename T >
const T mrpt::mrpt::utils::max3 ( const T &  A,
const T &  B,
const T &  C 
)
inline

Definition at line 150 of file CColouredPointsMap.h.

◆ min3()

template<typename T >
const T mrpt::mrpt::utils::min3 ( const T &  A,
const T &  B,
const T &  C 
)
inline

Definition at line 149 of file CColouredPointsMap.h.

◆ RAD2DEG() [1/2]

double mrpt::mrpt::utils::RAD2DEG ( const double  x)
inline

◆ RAD2DEG() [2/2]

float mrpt::mrpt::utils::RAD2DEG ( const float  x)
inline

Radians to degrees.

Definition at line 81 of file CColouredPointsMap.h.

◆ reverseBytes()

template<class T >
void mrpt::mrpt::utils::reverseBytes ( const T &  v_in,
T &  v_out 
)
inline

Reverse the order of the bytes of a given type (useful for transforming btw little/big endian)

Definition at line 176 of file CColouredPointsMap.h.

◆ reverseBytesInPlace()

template<class T >
void mrpt::mrpt::utils::reverseBytesInPlace ( T &  v_in_out)
inline

Reverse the order of the bytes of a given type (useful for transforming btw little/big endian)

Definition at line 169 of file CColouredPointsMap.h.

Referenced by mrpt::utils::CStream::ReadBufferFixEndianness().

◆ round()

template<typename T >
int mrpt::mrpt::utils::round ( const T  value)
inline

◆ round_long()

template<typename T >
long mrpt::mrpt::utils::round_long ( const T  value)
inline

Returns the closer integer (long) to x.

Definition at line 122 of file CColouredPointsMap.h.

◆ sign()

template<typename T >
int mrpt::mrpt::utils::sign ( x)
inline

Returns the sign of X as "1" or "-1".

Definition at line 92 of file CColouredPointsMap.h.

◆ signWithZero()

template<typename T >
int mrpt::mrpt::utils::signWithZero ( x)
inline

Returns the sign of X as "0", "1" or "-1".

Definition at line 96 of file CColouredPointsMap.h.

◆ square()

template<class T >
T mrpt::mrpt::utils::square ( const T  x)
inline

◆ vector_strong_clear()

template<class T >
void mrpt::mrpt::utils::vector_strong_clear ( std::vector< T > &  v)
inline

Like calling a std::vector<>'s clear() method, but really forcing deallocating the memory.

Definition at line 206 of file CColouredPointsMap.h.

Variable Documentation

◆ CStream

class BASE_IMPEXP mrpt::mrpt::utils::CStream

Definition at line 28 of file CColouredPointsMap.h.




Page generated by Doxygen 1.8.14 for MRPT 1.1.0 SVN: at lun oct 28 00:54:49 CET 2019 Hosted on:
SourceForge.net Logo