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

Detailed Description

Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.

Namespaces

 detail
 
 internal
 
 metaprogramming
 A set of utility objects for metaprogramming with STL algorithms.
 
 net
 A set of useful routines for networking.
 
 simpleini
 

Classes

class  bimap
 A bidirectional version of std::map, declared as bimap<KEY,VALUE> and which actually contains two std::map's, one for keys and another for values. More...
 
class  CArray
 A STL container (as wrapper) for arrays of constant size defined at compile time. More...
 
class  CArray< T, 0 >
 
class  CCanvas
 This virtual class defines the interface of any object accepting drawing primitives on it. More...
 
class  CClassRegistry
 A singleton with the central registry for CSerializable run-time classes: users do not use this class in any direct way. More...
 
class  CClientTCPSocket
 A TCP socket that can be connected to a TCP server, implementing MRPT's CStream interface for passing objects as well as generic read/write methods. More...
 
class  CConfigFile
 This class allows loading and storing values and vectors of different types from ".ini" files easily. More...
 
class  CConfigFileBase
 This class allows loading and storing values and vectors of different types from a configuration text, which can be implemented as a ".ini" file, a memory-stored string, etc... More...
 
class  CConfigFileMemory
 This class implements a config file-like interface over a memory-stored string list. More...
 
class  CConfigFilePrefixer
 A wrapper for other CConfigFileBase-based objects that prefixes a given token to every key and/or section. More...
 
class  CConsoleRedirector
 By creating an object of this class, all the output to std::cout (and std::cerr) will be redirected to a text file, and optionally also shown on the console. More...
 
class  CDebugOutputCapable
 This base class provides a common printf-like method to send debug information to std::cout, with the purpose of allowing its redirection to other streams if desired. More...
 
class  CDynamicGrid
 A 2D grid of dynamic size which stores any kind of data at each cell. More...
 
class  CDynamicGrid3D
 A 3D rectangular grid of dynamic size which stores any kind of data at each voxel. More...
 
class  CEnhancedMetaFile
 This class represents a Windows Enhanced Meta File (EMF) for generating and saving graphics. More...
 
class  CExceptionEOF
 Used in mrpt::utils::CStream. More...
 
class  CExceptionExternalImageNotFound
 Used in mrpt::utils::CImage. More...
 
class  CFileGZInputStream
 Transparently opens a compressed "gz" file and reads uncompressed data from it. More...
 
class  CFileInputStream
 This CStream derived class allow using a file as a read-only, binary stream. More...
 
class  CFileOutputStream
 This CStream derived class allow using a file as a write-only, binary stream. More...
 
class  CFileStream
 This CStream derived class allow using a file as a read/write binary stream, creating it if the file didn't exist. More...
 
struct  ci_less
 A case-insensitive comparator struct for usage within STL containers, eg: map<string,string,ci_less> More...
 
class  CImage
 A class for storing images as grayscale or RGB bitmaps. More...
 
class  circular_buffer
 A circular buffer of fixed size (defined at construction-time), implemented with a std::vector as the underlying storage. More...
 
struct  CLASSINIT
 Auxiliary structure used for CObject-based RTTI. More...
 
class  CListOfClasses
 A list (actually based on a std::set) of MRPT classes, capable of keeping any class registered by the mechanism of CSerializable classes. More...
 
class  CLoadableOptions
 This is a virtual base class for sets of options than can be loaded from and/or saved to configuration plain-text files. More...
 
class  CMappedImage
 This class encapsulates a MRPT Image and allows the sampling of individual pixels with sub-pixel accuracy and with a change of coordinates (eg, meters). More...
 
class  CMemoryChunk
 A memory buffer (implements CStream) which can be itself serialized. More...
 
class  CMemoryStream
 This CStream derived class allow using a memory buffer as a CStream. More...
 
class  CMessage
 A class that contain generic messages, that can be sent and received from a "CClientTCPSocket" object. More...
 
class  CMHPropertiesValuesList
 An arbitrary list of "annotations", or named attributes, each being an instance of any CSerializable object (Multi-hypotheses version). More...
 
class  CMRPTException
 The base for MRPT-especific exceptions. More...
 
class  CObject
 The virtual base class of all MRPT classes with a unified RTTI system. More...
 
struct  CObjectPtr
 
class  CObservable
 Inherit from this class for those objects capable of being observed by a CObserver class. More...
 
class  CObserver
 Inherit from this class to get notified about events from any CObservable object after subscribing to it. More...
 
struct  ContainerReadOnlyProxyAccessor
 A generic proxy accessor template that only allows read-only access to the original binded STL container object. More...
 
struct  copiable_NULL_ptr
 A wrapper class for pointers that, if copied with the "=" operator, should be set to NULL in the new copy. More...
 
struct  copiable_NULL_ptr_basic
 A wrapper class for pointers that, if copied with the "=" operator, should be set to NULL in the copy. More...
 
class  copy_ptr
 Smart pointer for non-polymorphic classes. More...
 
class  CProbabilityDensityFunction
 A generic template for probability density distributions (PDFs). More...
 
struct  CProfilerProxy
 
class  CPropertiesValuesList
 An arbitrary list of "annotations", or named attributes, each being an instance of any CSerializable object. More...
 
class  CRateTimer
 A class for calling sleep() in a loop, such that the amount of sleep time will be computed to make the loop run at the desired rate (in Hz). More...
 
class  CRobotSimulator
 
class  CSerializable
 The virtual base class which provides a unified interface for all persistent objects in MRPT. More...
 
class  CServerTCPSocket
 A TCP socket that can be wait for client connections to enter. More...
 
class  CSimpleDatabase
 This class impements a very simple database system. More...
 
class  CSimpleDatabaseTable
 This class implements the tables of databases. More...
 
class  CStdOutStream
 This CStdOutStream derived class allow printing to standard out, normally the console text output. More...
 
class  CStream
 This base class is used to provide a unified interface to files,memory buffers,..Please see the derived classes. More...
 
class  CStringList
 A class for storing a list of text lines. More...
 
class  CTextFileLinesParser
 A class for parsing text files, returning each non-empty and non-comment line, along its line number. More...
 
class  CThreadSafeQueue
 A thread-safe template queue for object passing between threads; for a template argument of T, the objects being passed in the queue are "T*". More...
 
class  CTicTac
 This class implements a high-performance stopwatch. More...
 
class  CTimeLogger
 A versatile "profiler" that logs the time spent within each pair of calls to enter(X)-leave(X), among other stats. More...
 
struct  CTimeLoggerEntry
 A safe way to call enter() and leave() of a mrpt::utils::CTimeLogger upon construction and destruction of this auxiliary object, making sure that leave() will be called upon exceptions, etc. More...
 
class  CTypeSelector
 This class represents a std::string derived class which is also CSerializable. More...
 
class  CUncopiable
 The base class of classes that cannot be copied: compile-time errors will be issued on any copy operation. More...
 
struct  ignored_copy_ptr
 A wrapper class for pointers whose copy operations from other objects of the same type are ignored, that is, doing "a=b;" has no effect neiter on "a" or "b". More...
 
struct  int_select_by_bytecount
 Usage: int_select_by_bytecount<N>type var; allows defining var as a signed integer with, at least, N bytes. More...
 
struct  int_select_by_bytecount< 1 >
 
struct  int_select_by_bytecount< 2 >
 
struct  int_select_by_bytecount< 3 >
 
struct  int_select_by_bytecount< 4 >
 
struct  int_select_by_bytecount< 8 >
 
class  list_searchable
 This class implements a STL container with features of both, a std::set and a std::list. More...
 
class  map_as_vector
 A STL-like container which looks and behaves (almost exactly) like a std::map<> but is implemented as a linear std::vector<> indexed by KEY. More...
 
struct  map_traits_map_as_vector
 Traits for using a mrpt::utils::map_as_vector<> (dense, fastest representation) More...
 
struct  map_traits_stdmap
 Traits for using a std::map<> (sparse representation) More...
 
class  mrptEvent
 The basic event type for the observer-observable pattern in MRPT. More...
 
class  mrptEventOnDestroy
 An event sent by any CObservable object (automatically) just before being destroyed and telling its observers to unsubscribe. More...
 
struct  non_copiable_ptr
 A wrapper class for pointers that can NOT be copied with "=" operator, raising an exception at runtime if a copy is attempted. More...
 
struct  non_copiable_ptr_basic
 A wrapper class for pointers that can NOT be copied with "=" operator, raising an exception at runtime if a copy is attempted. More...
 
struct  pimpl
 Pointer to IMPLementation auxiliary structure to make raw pointers movable, copiable and automatically deleted. More...
 
class  PLY_Exporter
 A virtual base class that implements the capability of exporting 3D point clouds and faces to a file in the Stanford PLY format. More...
 
class  PLY_Importer
 A virtual base class that implements the capability of importing 3D point clouds and faces from a file in the Stanford PLY format. More...
 
class  PointCloudAdapter
 An adapter to different kinds of point cloud object. More...
 
class  PointCloudAdapter< mrpt::maps::CColouredPointsMap >
 Specialization mrpt::utils::PointCloudAdapter<mrpt::maps::CColouredPointsMap> More...
 
class  PointCloudAdapter< mrpt::maps::CPointsMap >
 Specialization mrpt::utils::PointCloudAdapter<mrpt::maps::CPointsMap> More...
 
class  PointCloudAdapter< mrpt::maps::CSimplePointsMap >
 Specialization mrpt::utils::PointCloudAdapter<mrpt::maps::CSimplePointsMap> More...
 
class  PointCloudAdapter< mrpt::maps::CWeightedPointsMap >
 Specialization mrpt::utils::PointCloudAdapter<mrpt::maps::CWeightedPointsMap> More...
 
class  PointCloudAdapter< mrpt::obs::CObservation3DRangeScan >
 Specialization mrpt::utils::PointCloudAdapter<CObservation3DRangeScan> More...
 
class  PointCloudAdapter< mrpt::opengl::CPointCloud >
 Specialization mrpt::utils::PointCloudAdapter<mrpt::opengl::CPointCloud> More...
 
class  PointCloudAdapter< mrpt::opengl::CPointCloudColoured >
 Specialization mrpt::utils::PointCloudAdapter<mrpt::opengl::CPointCloudColoured> More...
 
class  PointCloudAdapter< pcl::PointCloud< pcl::PointXYZ > >
 Specialization mrpt::utils::PointCloudAdapter<pcl::PointCloud<pcl::PointXYZ> > for an XYZ point cloud (without RGB) More...
 
class  PointCloudAdapter< pcl::PointCloud< pcl::PointXYZRGB > >
 Specialization mrpt::utils::PointCloudAdapter<pcl::PointCloud<pcl::PointXYZRGB> > for an XYZ point cloud with RGB. More...
 
class  PointCloudAdapter< pcl::PointCloud< pcl::PointXYZRGBA > >
 Specialization mrpt::utils::PointCloudAdapter<pcl::PointCloud<pcl::PointXYZRGBA> > for an XYZ point cloud with RGB. More...
 
class  poly_ptr
 Smart pointer for polymorphic classes with a clone() method. More...
 
class  poly_ptr_ptr
 Wrapper to a smart pointer to polymorphic classes, capable of handling copy operator, etc. More...
 
struct  safe_ptr
 A wrapper class for pointers that can be safely copied with "=" operator without problems. More...
 
struct  safe_ptr_basic
 A wrapper class for pointers that can be safely copied with "=" operator without problems. More...
 
class  TCamera
 Structure to hold the parameters of a pinhole camera model. More...
 
struct  TColor
 A RGB color - 8bit. More...
 
struct  TColorf
 A RGB color - floats in the range [0,1]. More...
 
struct  TColorManager
 Manage R, G, B color triads and ask class instance of the next unique RGB combination. More...
 
struct  TEnumType
 A helper class that can convert an enum value into its textual representation, and viceversa. More...
 
struct  TEnumTypeFiller
 Only specializations of this class are defined for each enum type of interest. More...
 
struct  TEnumTypeFiller< bayes::TKFMethod >
 
struct  TEnumTypeFiller< hwdrivers::CGPSInterface::PARSERS >
 
struct  TEnumTypeFiller< hwdrivers::CKinect::TVideoChannel >
 
struct  TEnumTypeFiller< hwdrivers::CVelodyneScanner::model_t >
 
struct  TEnumTypeFiller< hwdrivers::CVelodyneScanner::return_type_t >
 
struct  TEnumTypeFiller< maps::CHeightGridMap2D::TMapRepresentation >
 
struct  TEnumTypeFiller< maps::CRandomFieldGridMap2D::TMapRepresentation >
 
struct  TEnumTypeFiller< mrpt::nav::CAbstractNavigator::TState >
 
struct  TEnumTypeFiller< mrpt::obs::CObservation3DRangeScan::TIntensityChannelID >
 
struct  TEnumTypeFiller< mrpt::poses::TInterpolatorMethod >
 
struct  TEnumTypeFiller< nav::CHolonomicND::TSituations >
 
struct  TEnumTypeFiller< nav::THolonomicMethod >
 
struct  TEnumTypeFiller< slam::CGridMapAligner::TAlignerMethod >
 
struct  TEnumTypeFiller< slam::TDataAssociationMethod >
 
struct  TEnumTypeFiller< slam::TDataAssociationMetric >
 
struct  TEnumTypeFiller< slam::TICPAlgorithm >
 
struct  TEnumTypeFiller< slam::TICPCovarianceMethod >
 
struct  TMatchingPair
 A structure for holding correspondences between two sets of points or points-like entities in 2D or 3D. More...
 
class  TMatchingPairList
 A list of TMatchingPair. More...
 
struct  TParameters
 For usage when passing a dynamic number of (numeric) arguments to a function, by name. More...
 
struct  TPixelCoord
 A pair (x,y) of pixel coordinates (integer resolution). More...
 
struct  TPixelCoordf
 A pair (x,y) of pixel coordinates (subpixel resolution). More...
 
struct  TPropertyValueIDTriplet
 Internal triplet for each property in utils::CMHPropertiesValuesList. More...
 
struct  TRuntimeClassId
 A structure that holds runtime class type information. More...
 
struct  ts_map_entry
 
class  TStereoCamera
 Structure to hold the parameters of a pinhole stereo camera model. More...
 
struct  TTypeName
 A template to obtain the type of its argument as a string at compile time. More...
 
struct  TTypeName< mrpt::graphs::CNetworkOfPoses< CPOSE, MAPS_IMPLEMENTATION, NODE_ANNOTATIONS, EDGE_ANNOTATIONS > >
 
struct  TTypeName< mrpt::math::CArrayDouble< N > >
 
struct  TTypeName< mrpt::math::CArrayFloat< N > >
 
struct  TTypeName< mrpt::math::CArrayNumeric< T, N > >
 
struct  TTypeName< mrpt::math::CMatrixFixedNumeric< T, N, M > >
 
struct  TTypeName< mrpt::math::CMatrixTemplateNumeric< T > >
 
struct  TTypeName< mrpt::opengl::CLight >
 
struct  TTypeName< std::pair< T1, T2 > >
 
struct  uint_select_by_bytecount
 Usage: uint_select_by_bytecount<N>type var; allows defining var as a unsigned integer with, at least, N bytes. More...
 
struct  uint_select_by_bytecount< 1 >
 
struct  uint_select_by_bytecount< 2 >
 
struct  uint_select_by_bytecount< 3 >
 
struct  uint_select_by_bytecount< 4 >
 
struct  uint_select_by_bytecount< 8 >
 

Typedefs

typedef int TFileOpenModes
 File open modes are used in CFileStream Posible values are: More...
 
typedef int TImageChannels
 For use in mrpt::utils::CImage. More...
 
typedef CThreadSafeQueue< CMessageCMessageQueue
 A thread-safe class for message passing between threads. More...
 
typedef safe_ptr_basic< voidvoid_ptr
 
typedef non_copiable_ptr_basic< voidvoid_ptr_noncopy
 
typedef TMatchingPairTMatchingPairPtr
 
typedef TMatchingPair const * TMatchingPairConstPtr
 
typedef TParameters< double > TParametersDouble
 See the generic template mrpt::utils::TParameters. More...
 
typedef TParameters< std::stringTParametersString
 See the generic template mrpt::utils::TParameters. More...
 
typedef TPixelCoord TImageSize
 A type for image sizes. More...
 
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...
 
typedef std::map< std::string, const TRuntimeClassId * > TClassnameToRuntimeId
 
typedef void(* TRegisterFunction) ()
 

Enumerations

enum  { fomRead = 1, fomWrite = 2, fomAppend = 4 }
 
enum  TInterpolationMethod { IMG_INTERP_NN = 0, IMG_INTERP_LINEAR =1, IMG_INTERP_CUBIC =2, IMG_INTERP_AREA =3 }
 Interpolation methods for images. More...
 
enum  TConstructorFlags_CImage { UNINITIALIZED_IMAGE = 0, FAST_REF_OR_CONVERT_TO_GRAY = 1 }
 For usage in one of the CImage constructors. More...
 
enum  TColormap { cmGRAYSCALE = 0, cmJET, cmHOT }
 Different colormaps for use in mrpt::utils::colormap() More...
 

Functions

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 >
lowestPositive (const T a, const T b)
 Returns the lowest, possitive among two numbers. 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 SMART_PTR >
RgetAs (SMART_PTR &o)
 < Allow square() to be available under mrpt::math and mrpt::utils More...
 
template<class R , class SMART_PTR >
const RgetAs (const SMART_PTR &o)
 Utility to get a cast'ed pointer from a smart pointer. More...
 
void BASE_IMPEXP reverseBytesInPlace (bool &v_in_out)
 Reverse the order of the bytes of a given type (useful for transforming btw little/big endian) More...
 
void BASE_IMPEXP reverseBytesInPlace (uint8_t &v_in_out)
 
void BASE_IMPEXP reverseBytesInPlace (int8_t &v_in_out)
 
void BASE_IMPEXP reverseBytesInPlace (uint16_t &v_in_out)
 
void BASE_IMPEXP reverseBytesInPlace (int16_t &v_in_out)
 
void BASE_IMPEXP reverseBytesInPlace (uint32_t &v_in_out)
 
void BASE_IMPEXP reverseBytesInPlace (int32_t &v_in_out)
 
void BASE_IMPEXP reverseBytesInPlace (uint64_t &v_in_out)
 
void BASE_IMPEXP reverseBytesInPlace (int64_t &v_in_out)
 
void BASE_IMPEXP reverseBytesInPlace (float &v_in_out)
 
void BASE_IMPEXP reverseBytesInPlace (double &v_in_out)
 
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<typename T >
void saturate (T &var, const T sat_min, const T sat_max)
 Saturate the value of var (the variable gets modified) so it does not get out of [min,max]. More...
 
template<typename T >
saturate_val (const T &value, const T sat_min, const T sat_max)
 Like saturate() but it returns the value instead of modifying the variable. 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 VECTOR_T >
void vector_strong_clear (VECTOR_T &v)
 Like calling a std::vector<>'s clear() method, but really forcing deallocating the memory. More...
 
template<typename T >
length2length4N (T len)
 Returns the smaller number >=len such that it's a multiple of 4. More...
 
template<class T , std::size_t N>
bool operator== (const CArray< T, N > &x, const CArray< T, N > &y)
 
template<class T , std::size_t N>
bool operator< (const CArray< T, N > &x, const CArray< T, N > &y)
 
template<class T , std::size_t N>
bool operator!= (const CArray< T, N > &x, const CArray< T, N > &y)
 
template<class T , std::size_t N>
bool operator> (const CArray< T, N > &x, const CArray< T, N > &y)
 
template<class T , std::size_t N>
bool operator<= (const CArray< T, N > &x, const CArray< T, N > &y)
 
template<class T , std::size_t N>
bool operator>= (const CArray< T, N > &x, const CArray< T, N > &y)
 
::mrpt::utils::CStreamoperator>> (mrpt::utils::CStream &in, CImagePtr &pObj)
 
::mrpt::utils::CStreamoperator>> (mrpt::utils::CStream &in, CMemoryChunkPtr &pObj)
 
::mrpt::utils::CStreamoperator>> (mrpt::utils::CStream &in, CMHPropertiesValuesListPtr &pObj)
 
void BASE_IMPEXP registerAllPendingClasses ()
 Register all pending classes - to be called just before de-serializing an object, for example. More...
 
void BASE_IMPEXP hsv2rgb (float h, float s, float v, float &r, float &g, float &b)
 Transform HSV color components to RGB, all of them in the range [0,1]. More...
 
void BASE_IMPEXP rgb2hsv (float r, float g, float b, float &h, float &s, float &v)
 Transform RGB color components to HSV, all of them in the range [0,1]. More...
 
void BASE_IMPEXP colormap (const TColormap &color_map, const float color_index, float &r, float &g, float &b)
 Transform a float number in the range [0,1] into RGB components. More...
 
void BASE_IMPEXP jet2rgb (const float color_index, float &r, float &g, float &b)
 Computes the RGB color components (range [0,1]) for the corresponding color index in the range [0,1] using the MATLAB 'jet' colormap. More...
 
void BASE_IMPEXP hot2rgb (const float color_index, float &r, float &g, float &b)
 Computes the RGB color components (range [0,1]) for the corresponding color index in the range [0,1] using the MATLAB 'hot' colormap. More...
 
::mrpt::utils::CStreamoperator>> (mrpt::utils::CStream &in, CPropertiesValuesListPtr &pObj)
 
uint16_t BASE_IMPEXP compute_CRC16 (const std::vector< uint8_t > &data, const uint16_t gen_pol=0x8005)
 Computes the CRC16 checksum of a block of data. More...
 
uint16_t BASE_IMPEXP compute_CRC16 (const uint8_t *data, const size_t len, const uint16_t gen_pol=0x8005)
 
uint32_t BASE_IMPEXP compute_CRC32 (const std::vector< uint8_t > &data, const uint32_t gen_pol=0xEDB88320L)
 Computes the CRC32 checksum of a block of data. More...
 
uint32_t BASE_IMPEXP compute_CRC32 (const uint8_t *data, const size_t len, const uint32_t gen_pol=0xEDB88320L)
 
std::string BASE_IMPEXP ObjectToString (const CSerializable *o)
 Used to pass MRPT objects into a CORBA-like object (strings). More...
 
void BASE_IMPEXP StringToObject (const std::string &str, CSerializablePtr &obj)
 Used to pass CORBA-like objects (strings) into a MRPT object. More...
 
void BASE_IMPEXP ObjectToOctetVector (const CSerializable *o, vector_byte &out_vector)
 Converts (serializes) an MRPT object into an array of bytes. More...
 
void BASE_IMPEXP OctetVectorToObject (const vector_byte &in_data, CSerializablePtr &obj)
 Converts back (de-serializes) a sequence of binary data into a MRPT object, without prior information about the object's class. More...
 
void BASE_IMPEXP ObjectToRawString (const CSerializable *o, std::string &out_str)
 Converts (serializes) an MRPT object into an array of bytes within a std::string, without codifying to avoid NULL characters. More...
 
void BASE_IMPEXP RawStringToObject (const std::string &in_str, CSerializablePtr &obj)
 Converts back (de-serializes) a sequence of binary data within a std::string into a MRPT object, without prior information about the object's class. More...
 
::mrpt::utils::CStreamoperator>> (mrpt::utils::CStream &in, CSimpleDatabasePtr &pObj)
 
::mrpt::utils::CStreamoperator>> (mrpt::utils::CStream &in, CSimpleDatabaseTablePtr &pObj)
 
CStream BASE_IMPEXPoperator<< (mrpt::utils::CStream &s, const char *a)
 
CStream BASE_IMPEXPoperator<< (mrpt::utils::CStream &s, const std::string &str)
 
CStream BASE_IMPEXPoperator<< (mrpt::utils::CStream &, const vector_int &a)
 
CStream BASE_IMPEXPoperator<< (mrpt::utils::CStream &, const vector_uint &a)
 
CStream BASE_IMPEXPoperator<< (mrpt::utils::CStream &, const vector_word &a)
 
CStream BASE_IMPEXPoperator<< (mrpt::utils::CStream &, const vector_signed_word &a)
 
CStream BASE_IMPEXPoperator<< (mrpt::utils::CStream &, const vector_long &a)
 
CStream BASE_IMPEXPoperator<< (mrpt::utils::CStream &, const vector_byte &a)
 
CStream BASE_IMPEXPoperator<< (mrpt::utils::CStream &, const vector_signed_byte &a)
 
CStream BASE_IMPEXPoperator<< (mrpt::utils::CStream &, const vector_bool &a)
 
CStream BASE_IMPEXPoperator<< (mrpt::utils::CStream &, const std::vector< std::string > &)
 
CStream BASE_IMPEXPoperator<< (mrpt::utils::CStream &, const std::vector< size_t > &a)
 
CStream BASE_IMPEXPoperator>> (mrpt::utils::CStream &in, char *a)
 
CStream BASE_IMPEXPoperator>> (mrpt::utils::CStream &in, std::string &str)
 
CStream BASE_IMPEXPoperator>> (mrpt::utils::CStream &in, vector_int &a)
 
CStream BASE_IMPEXPoperator>> (mrpt::utils::CStream &in, vector_uint &a)
 
CStream BASE_IMPEXPoperator>> (mrpt::utils::CStream &in, vector_word &a)
 
CStream BASE_IMPEXPoperator>> (mrpt::utils::CStream &in, vector_signed_word &a)
 
CStream BASE_IMPEXPoperator>> (mrpt::utils::CStream &in, vector_long &a)
 
CStream BASE_IMPEXPoperator>> (mrpt::utils::CStream &in, vector_byte &a)
 
CStream BASE_IMPEXPoperator>> (mrpt::utils::CStream &in, vector_signed_byte &a)
 
CStream BASE_IMPEXPoperator>> (mrpt::utils::CStream &in, vector_bool &a)
 
CStream BASE_IMPEXPoperator>> (mrpt::utils::CStream &in, std::vector< std::string > &a)
 
CStream BASE_IMPEXPoperator>> (mrpt::utils::CStream &s, std::vector< float > &a)
 
CStream BASE_IMPEXPoperator>> (mrpt::utils::CStream &s, std::vector< double > &a)
 
CStream BASE_IMPEXPoperator<< (mrpt::utils::CStream &s, const std::vector< float > &a)
 
CStream BASE_IMPEXPoperator<< (mrpt::utils::CStream &s, const std::vector< double > &a)
 
CStream BASE_IMPEXPoperator>> (mrpt::utils::CStream &s, std::vector< size_t > &a)
 
::mrpt::utils::CStreamoperator>> (mrpt::utils::CStream &in, CStringListPtr &pObj)
 
::mrpt::utils::CStreamoperator>> (mrpt::utils::CStream &in, CTypeSelectorPtr &pObj)
 
std::string BASE_IMPEXP md5 (const std::string &str)
 Computes the md5 of a block of data. More...
 
std::string BASE_IMPEXP md5 (const mrpt::vector_byte &str)
 Computes the md5 of a block of data. More...
 
std::string BASE_IMPEXP md5 (const unsigned char *data, const size_t len)
 Computes the md5 of a block of data. More...
 
template<typename T >
std::string sprintf_vector (const char *fmt, const std::vector< T > &V)
 Generates a string for a vector in the format [A,B,C,...] to std::cout, and the fmt string for each vector element. More...
 
template<typename Derived >
std::string sprintf_vector (const char *fmt, const Eigen::MatrixBase< Derived > &V)
 
template<typename T >
void printf_vector (const char *fmt, const std::vector< T > &V)
 Prints a vector in the format [A,B,C,...] to std::cout, and the fmt string for each vector element. 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<class T >
round_10power (T val, int power10)
 Round a decimal number up to the given 10'th power (eg, to 1000,100,10, and also fractions) power10 means round up to: 1 -> 10, 2 -> 100, 3 -> 1000, ... More...
 
template<typename ZMQ_SOCKET_TYPE >
void mrpt_send_to_zmq (ZMQ_SOCKET_TYPE zmq_socket, const mrpt::utils::CSerializable &obj, const size_t max_packet_len=0)
 Send an MRPT object to a ZMQ socket. More...
 
template<typename ZMQ_SOCKET_TYPE , typename VECTOR_MSG_T >
bool mrpt_recv_from_zmq_buf (ZMQ_SOCKET_TYPE zmq_socket, VECTOR_MSG_T &out_lst_msgs, mrpt::utils::CMemoryStream &target_buf, bool dont_wait, size_t *rx_obj_length_in_bytes)
 Users may normally call mrpt_recv_from_zmq() and mrpt_recv_from_zmq_into(). More...
 
template<typename ZMQ_SOCKET_TYPE >
mrpt::utils::CSerializablePtr mrpt_recv_from_zmq (ZMQ_SOCKET_TYPE zmq_socket, bool dont_wait=false, size_t *rx_obj_length_in_bytes=NULL)
 Receives an MRPT object from a ZMQ socket, determining the type of the object on-the-fly. More...
 
template<typename ZMQ_SOCKET_TYPE >
bool mrpt_recv_from_zmq_into (ZMQ_SOCKET_TYPE zmq_socket, mrpt::utils::CSerializable &target_object, bool dont_wait=false, size_t *rx_obj_length_in_bytes=NULL)
 Like mrpt_recv_from_zmq() but without dynamically allocating the received object, more efficient to use if the type of the received object is known in advance. More...
 
template<class T , class CONTAINER >
size_t find_in_vector (const T &value, const CONTAINER &vect)
 Returns the index of the value "T" in the container "vect" (std::vector,std::deque,etc), or string::npos if not found. More...
 
template<class T >
std::list< T >::iterator erase_return_next (std::list< T > &cont, typename std::list< T >::iterator &it)
 Calls the standard "erase" method of a STL container, but also returns an iterator to the next element in the container (or end if none) More...
 
template<class K , class V >
std::map< K, V >::iterator erase_return_next (std::map< K, V > &cont, typename std::map< K, V >::iterator &it)
 
template<class K , class V >
std::multimap< K, V >::iterator erase_return_next (std::multimap< K, V > &cont, typename std::multimap< K, V >::iterator &it)
 
template<class T >
std::set< T >::iterator erase_return_next (std::set< T > &cont, typename std::set< T >::iterator &it)
 
template<class T >
std::string getSTLContainerAsString (const T &t)
 Return a STL container in std::string form. More...
 
template<class T >
void printSTLContainer (const T &t)
 Print the given vector t. More...
 
template<class T >
void printSTLContainerOfContainers (const T &t)
 Print the given STL container of containers t. More...
 
template<class T1 , class T2 >
std::string getMapAsString (const std::map< T1, T2 > &m, const std::string &sep=" => ")
 Return contents of map in a string representation. More...
 
template<class T1 , class T2 >
void printMap (const std::map< T1, T2 > &m)
 Print the given map m. More...
 
 MRPTSTL_SERIALIZABLE_SEQ_CONTAINER (std::vector) MRPTSTL_SERIALIZABLE_SEQ_CONTAINER(std
 Template method to serialize a STL pair. More...
 
template<class T1 , class T2 >
CStreamoperator>> (mrpt::utils::CStream &in, std::pair< T1, T2 > &obj)
 Template method to deserialize a STL pair. More...
 
::mrpt::utils::CStreamoperator>> (mrpt::utils::CStream &in, TCameraPtr &pObj)
 
bool BASE_IMPEXP operator== (const mrpt::utils::TCamera &a, const mrpt::utils::TCamera &b)
 
bool BASE_IMPEXP operator!= (const mrpt::utils::TCamera &a, const mrpt::utils::TCamera &b)
 
std::ostream BASE_IMPEXPoperator<< (std::ostream &o, const TColor &c)
 
CStream BASE_IMPEXPoperator<< (mrpt::utils::CStream &o, const TColor &c)
 
CStream BASE_IMPEXPoperator>> (mrpt::utils::CStream &i, TColor &c)
 
TColor operator+ (const TColor &first, const TColor &second)
 Pairwise addition of their corresponding RGBA members. More...
 
TColor operator- (const TColor &first, const TColor &second)
 Pairwise substraction of their corresponding RGBA members. More...
 
bool operator== (const TColor &first, const TColor &second)
 
std::ostream BASE_IMPEXPoperator<< (std::ostream &o, const TColorf &c)
 
CStream BASE_IMPEXPoperator<< (mrpt::utils::CStream &o, const TColorf &c)
 
CStream BASE_IMPEXPoperator>> (mrpt::utils::CStream &i, TColorf &c)
 
bool BASE_IMPEXP operator< (const TMatchingPair &a, const TMatchingPair &b)
 A comparison operator, for sorting lists of TMatchingPair's, first order by this_idx, if equals, by other_idx. More...
 
bool BASE_IMPEXP operator== (const TMatchingPair &a, const TMatchingPair &b)
 A comparison operator. More...
 
bool BASE_IMPEXP operator== (const TMatchingPairList &a, const TMatchingPairList &b)
 A comparison operator. More...
 
std::ostream BASE_IMPEXPoperator<< (std::ostream &o, const TPixelCoordf &p)
 Prints TPixelCoordf as "(x,y)". More...
 
std::ostream BASE_IMPEXPoperator<< (std::ostream &o, const TPixelCoord &p)
 Prints TPixelCoord as "(x,y)". More...
 
void BASE_IMPEXP reduced_hash (const std::string &value, uint8_t &hash)
 hash function used by ts_hash_map. Uses dbj2 method More...
 
void BASE_IMPEXP reduced_hash (const std::string &value, uint16_t &hash)
 hash function used by ts_hash_map. Uses dbj2 method More...
 
void BASE_IMPEXP reduced_hash (const std::string &value, uint32_t &hash)
 hash function used by ts_hash_map. Uses dbj2 method More...
 
void BASE_IMPEXP reduced_hash (const std::string &value, uint64_t &hash)
 hash function used by ts_hash_map. Uses dbj2 method More...
 
template<typename KEY , typename VALUE , unsigned int NUM_BYTES_HASH_TABLE = 1, unsigned int NUM_HAS_TABLE_COLLISIONS_ALLOWED = 5, typename VECTOR_T = mrpt::utils::CArray< mrpt::utils::CArray<ts_map_entry<KEY,VALUE>, NUM_HAS_TABLE_COLLISIONS_ALLOWED>, 1u << (8*NUM_BYTES_HASH_TABLE)> > class ts_hash_map { public: typedef ts_hash_map<KEY, VALUE, NUM_BYTES_HASH_TABLE, NUM_HAS_TABLE_COLLISIONS_ALLOWED, VECTOR_T> self_t; typedef KEY key_type; typedef ts_map_entry<KEY,VALUE> value_type; typedef VECTOR_T vec_t; struct iterator; struct const_iterator { public: const_iterator() : m_vec(NULL), m_parent(NULL), m_idx_outer(0), m_idx_inner(0) {} const_iterator(const VECTOR_T &vec, const self_t &parent, int idx_outer, int idx_inner) : m_vec(const_cast<VECTOR_T*>(&vec)), m_parent(const_cast<self_t*>(&parent)), m_idx_outer(idx_outer), m_idx_inner(idx_inner) {} const_iterator & operator = (const const_iterator& o) { m_vec = o.m_vec; m_idx_outer = o.m_idx_outer; m_idx_inner = o.m_idx_inner; return *this; } bool operator == (const const_iterator& o) const { return m_vec == o.m_vec && m_idx_outer == o.m_idx_outer && m_idx_inner == o.m_idx_inner; } bool operator != (const const_iterator& o) const { return !(*this==o); } const value_type & operator *() const { return (*m_vec)[m_idx_outer][m_idx_inner]; } const value_type * operator ->() const { return &(*m_vec)[m_idx_outer][m_idx_inner]; } inline const_iterator operator ++(int) { const_iterator aux = *this; ++(*this); return aux; } inline const_iterator& operator ++() { incr(); return *this; } protected: VECTOR_T *m_vec; self_t *m_parent; int m_idx_outer>
iterator operator++ (int)
 A thread-safe (ts) container which minimally emulates a std::map<>'s [] and find() methods but which is implemented as a linear vector indexed by a hash of KEY. More...
 
iteratoroperator++ ()
 
::mrpt::utils::CStreamoperator>> (mrpt::utils::CStream &in, TStereoCameraPtr &pObj)
 
CStream BASE_IMPEXPoperator<< (mrpt::utils::CStream &s, const mrpt::math::CVectorFloat &a)
 
CStream BASE_IMPEXPoperator<< (mrpt::utils::CStream &s, const mrpt::math::CVectorDouble &a)
 
CStream BASE_IMPEXPoperator>> (mrpt::utils::CStream &in, mrpt::math::CVectorDouble &a)
 
CStream BASE_IMPEXPoperator>> (mrpt::utils::CStream &in, mrpt::math::CVectorFloat &a)
 
std::atomic< int > BASE_IMPEXPpending_class_registers_count ()
 
CThreadSafeQueue< TRegisterFunction > BASE_IMPEXPpending_class_registers ()
 
CStreamoperator<< (mrpt::utils::CStream &out, const COctoMapVoxels::TInfoPerVoxelSet &a)
 
CStreamoperator>> (mrpt::utils::CStream &in, COctoMapVoxels::TInfoPerVoxelSet &a)
 
CStreamoperator<< (mrpt::utils::CStream &out, const COctoMapVoxels::TGridCube &a)
 
CStreamoperator>> (mrpt::utils::CStream &in, COctoMapVoxels::TGridCube &a)
 
CStreamoperator<< (mrpt::utils::CStream &out, const COctoMapVoxels::TVoxel &a)
 
CStreamoperator>> (mrpt::utils::CStream &in, COctoMapVoxels::TVoxel &a)
 
Auxiliary stuff for the global profiler used in MRPT_START / MRPT_END macros.
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
 
mrpt::utils::CTimeLogger BASE_IMPEXPglobal_profiler_getref () MRPT_NO_THROWS
 
Constructors, read/write access and other operations
 ts_hash_map ()
 < Default constructor */ More...
 
void clear ()
 Clear the contents of this container. More...
 
bool empty () const
 
VALUE & operator[] (const KEY &key)
 Write/read via [i] operator, that creates an element if it didn't exist already. More...
 
const_iterator find (const KEY &key) const
 
const_iterator begin () const
 
const_iterator end () const
 

Variables

int BASE_IMPEXP MRPT_SAVE_NAME_PADDING = 50
 
int BASE_IMPEXP MRPT_SAVE_VALUE_PADDING = 20
 Default padding sizes for macros MRPT_SAVE_CONFIG_VAR_COMMENT(), etc. More...
 
vec_t m_vec
 The actual container. More...
 
size_t m_size
 Number of elements accessed with write access so far. More...
 
std::string MRPT_GLOBAL_UNITTEST_SRC_DIR
 
volatile bool BASE_IMPEXP pending_class_registers_modified = false
 Set to true if pending_class_registers() has been called after registerAllPendingClasses(). Startup value is false. More...
 

RTTI classes and functions

typedef safe_ptr< TRuntimeClassIdTRuntimeClassIdPtr
 A wrapper class for a "TRuntimeClassId *", well-defined with respect to copy operators and constructors. More...
 
class BASE_IMPEXP CObject
 
struct BASE_IMPEXP CObjectPtr
 A smart pointer to a CObject object. More...
 
void BASE_IMPEXP registerClass (const mrpt::utils::TRuntimeClassId *pNewClass)
 Register a class into the MRPT internal list of "CSerializable" descendents. More...
 
void BASE_IMPEXP registerClassCustomName (const char *customName, const TRuntimeClassId *pNewClass)
 Mostly for internal use within mrpt sources, to handle exceptional cases with multiple serialization names for backward compatibility (CMultiMetricMaps, CImage,...) More...
 
std::vector< const mrpt::utils::TRuntimeClassId * > BASE_IMPEXP getAllRegisteredClasses ()
 Returns a list with all the classes registered in the system through mrpt::utils::registerClass. More...
 
std::vector< const TRuntimeClassId * > BASE_IMPEXP getAllRegisteredClassesChildrenOf (const TRuntimeClassId *parent_id)
 Like getAllRegisteredClasses(), but filters the list to only include children clases of a given base one. More...
 
const TRuntimeClassId BASE_IMPEXPfindRegisteredClass (const std::string &className)
 Return info about a given class by its name, or NULL if the class is not registered. More...
 

Typedef Documentation

◆ TClassnameToRuntimeId

Definition at line 55 of file internal_class_registry.cpp.

◆ TFileOpenModes

File open modes are used in CFileStream Posible values are:

  • fomRead
  • fomWrite (creates the file if it didn't exist, otherwise truncates it).
  • fomAppend (creates the file if it didn't exist)

Definition at line 27 of file CFileStream.h.

◆ TImageChannels

For use in mrpt::utils::CImage.

Definition at line 40 of file CImage.h.

◆ TImageSize

A type for image sizes.

Definition at line 49 of file TPixelCoord.h.

◆ TMatchingPairConstPtr

Definition at line 73 of file TMatchingPair.h.

◆ TMatchingPairPtr

Definition at line 72 of file TMatchingPair.h.

◆ TParametersDouble

See the generic template mrpt::utils::TParameters.

Definition at line 115 of file TParameters.h.

◆ TParametersString

See the generic template mrpt::utils::TParameters.

Definition at line 116 of file TParameters.h.

◆ TRegisterFunction

typedef void(* mrpt::utils::TRegisterFunction) ()

Definition at line 19 of file internal_class_registry.h.

◆ void_ptr

Definition at line 243 of file safe_pointers.h.

◆ void_ptr_noncopy

Definition at line 244 of file safe_pointers.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
fomRead 
fomWrite 
fomAppend 

Definition at line 28 of file CFileStream.h.

◆ TConstructorFlags_CImage

For usage in one of the CImage constructors.

Enumerator
UNINITIALIZED_IMAGE 
FAST_REF_OR_CONVERT_TO_GRAY 

Definition at line 45 of file CImage.h.

Function Documentation

◆ abs_diff()

template<typename T >
T 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 124 of file bits.h.

References min.

◆ begin()

iterator mrpt::utils::begin ( ) const

◆ clear()

void mrpt::utils::clear ( )

Clear the contents of this container.

Definition at line 113 of file ts_hash_map.h.

References m_size, and m_vec.

Referenced by mrpt::slam::CIncrementalMapPartitioner::CIncrementalMapPartitioner(), mrpt::math::CPolygon::Clear(), mrpt::maps::CMultiMetricMapPDF::clear(), mrpt::math::MatrixBlockSparseCols< Scalar, NROWS, NCOLS, INFO, HAS_REMAP, INDEX_REMAP_MAP_IMPL >::clearColEntries(), mrpt::gui::CDisplayWindowPlots::clf(), mrpt::maps::CMultiMetricMapPDF::CMultiMetricMapPDF(), mrpt::maps::COccupancyGridMap2D::findCriticalPoints(), mrpt::nav::CReactiveNavigationSystem3D::implementSenseObstacles(), mrpt::hwdrivers::CTuMicos::init(), mrpt::maps::CMetricMap::loadFromProbabilisticPosesAndObservations(), mrpt::obs::CRawlog::loadFromRawLogFile(), mrpt::vision::TSequenceFeatureObservations::loadFromTextFile(), mrpt::poses::CPoseInterpolatorBase< 3 >::loadFromTextFile(), mrpt::utils::CSimpleDatabase::loadFromXML(), mrpt::obs::CRawlog::moveFrom(), mrpt::hmtslam::TArcList::read(), mrpt::utils::CPropertiesValuesList::readFromStream(), mrpt::opengl::C3DSScene::readFromStream(), mrpt::opengl::CSetOfObjects::readFromStream(), mrpt::maps::CColouredOctoMap::readFromStream(), mrpt::hmtslam::CHierarchicalMHMap::readFromStream(), mrpt::hmtslam::CRobotPosesGraph::readFromStream(), mrpt::maps::COctoMap::readFromStream(), mrpt::opengl::CAssimpModel::readFromStream(), mrpt::utils::CMHPropertiesValuesList::readFromStream(), mrpt::maps::CBeaconMap::readFromStream(), mrpt::obs::CRawlog::readFromStream(), mrpt::obs::CObservationGPS::readFromStream(), mrpt::hmtslam::THypothesisIDSet::readFromStream(), mrpt::utils::CSimpleDatabase::readFromStream(), mrpt::poses::CPosePDFParticles::resetAroundSetOfPoses(), mrpt::poses::CPosePDFParticles::resetDeterministic(), mrpt::poses::CPosePDFParticles::resetUniform(), mrpt::nav::ClearanceDiagram::resize(), run_rnav_test(), mrpt::opengl::CPointCloud::setAllPointsFast(), mrpt::maps::CPointsMap::setFromPCLPointCloud(), mrpt::maps::CColouredPointsMap::setFromPCLPointCloudRGB(), mrpt::graphslam::TUncertaintyPath< GRAPH_T >::TUncertaintyPath(), mrpt::hmtslam::CHierarchicalMHMap::~CHierarchicalMHMap(), mrpt::slam::CIncrementalMapPartitioner::~CIncrementalMapPartitioner(), mrpt::utils::CMHPropertiesValuesList::~CMHPropertiesValuesList(), mrpt::utils::CPropertiesValuesList::~CPropertiesValuesList(), mrpt::obs::CRawlog::~CRawlog(), mrpt::opengl::CSetOfObjects::~CSetOfObjects(), and mrpt::utils::CSimpleDatabase::~CSimpleDatabase().

◆ DEG2RAD() [1/3]

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

◆ DEG2RAD() [2/3]

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

Degrees to radians.

Definition at line 84 of file bits.h.

References M_PIf.

◆ DEG2RAD() [3/3]

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

Degrees to radians.

Definition at line 86 of file bits.h.

References M_PIf.

◆ delete_safe()

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

◆ empty()

bool mrpt::utils::empty ( ) const

◆ end()

iterator mrpt::utils::end ( ) const

◆ find()

const_iterator mrpt::utils::find ( const KEY &  key) const

Definition at line 139 of file ts_hash_map.h.

References end(), m_vec, and reduced_hash().

Referenced by mrpt::opengl::CPolyhedron::addEdges(), mrpt::graphslam::deciders::CLoopCloserERD< GRAPH_T >::checkPartitionsForLC(), mrpt::opengl::CSetOfObjects::contains(), mrpt::opengl::COpenGLStandardObject::enable(), mrpt::graphs::ScalarFactorGraph::eraseConstraint(), mrpt::opengl::CPolyhedron::facesInVertex(), mrpt::utils::list_searchable< CHMHMapNode::TNodeID >::find(), xsens::List< uint32_t >::findSorted(), mrpt::math::CBinaryRelation< T, U, UIsObject >::getRelationFrom(), mrpt::math::CBinaryRelation< T, U, UIsObject >::getRelationTo(), mrpt::math::CBinaryRelation< T, U, UIsObject >::getRelationValue(), getVerticesAndFaces(), mrpt::utils::TParameters< double >::getWithDefaultVal(), mrpt::utils::TParameters< double >::has(), mrpt::hmtslam::THypothesisIDSet::has(), mrpt::graphslam::CGraphSlamEngine< GRAPH_T >::initClass(), mrpt::math::CBinaryRelation< T, U, UIsObject >::insertElements(), mrpt::opengl::COpenGLStandardObject::isEnabled(), mrpt::utils::TParameters< double >::operator[](), mrpt::slam::PF_implementation< mrpt::poses::CPose3D, CMonteCarloLocalization3D >::PF_SLAM_implementation_pfAuxiliaryPFStandardAndOptimal(), mrpt::math::CBinaryRelation< T, U, UIsObject >::removeElement(), mrpt::math::CBinaryRelation< T, U, UIsObject >::removeElements(), mrpt::math::CBinaryRelation< T, U, UIsObject >::setRelationValue(), and mrpt::graphslam::deciders::CLoopCloserERD< GRAPH_T >::updateMapPartitionsVisualization().

◆ fix()

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

Rounds toward zero.

Definition at line 133 of file bits.h.

Referenced by mrpt::topography::GeodeticToUTM(), and mrpt::topography::geodeticToUTM().

◆ getAs() [1/2]

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

< Allow square() to be available under mrpt::math and mrpt::utils

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

Definition at line 139 of file bits.h.

References R.

◆ getAs() [2/2]

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

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

Definition at line 143 of file bits.h.

References R.

◆ global_profiler_enter()

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

◆ global_profiler_getref()

CTimeLogger & mrpt::utils::global_profiler_getref ( )

Definition at line 44 of file CTimeLogger.cpp.

References global_profiler.

◆ global_profiler_leave()

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

◆ keep_max()

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

◆ keep_min()

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

◆ length2length4N()

template<typename T >
T mrpt::utils::length2length4N ( len)

Returns the smaller number >=len such that it's a multiple of 4.

Definition at line 209 of file bits.h.

Referenced by mrpt::maps::CWeightedPointsMap::reserve(), mrpt::maps::CSimplePointsMap::reserve(), and mrpt::maps::CColouredPointsMap::reserve().

◆ lowestPositive()

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

Returns the lowest, possitive among two numbers.

If both are non-positive (<=0), the lowest one is returned.

Definition at line 112 of file bits.h.

◆ max3()

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

◆ min3()

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

◆ operator!=() [1/2]

bool mrpt::utils::operator!= ( const mrpt::utils::TCamera a,
const mrpt::utils::TCamera b 
)

Definition at line 200 of file TCamera.cpp.

◆ operator!=() [2/2]

template<class T , std::size_t N>
bool mrpt::utils::operator!= ( const CArray< T, N > &  x,
const CArray< T, N > &  y 
)

Definition at line 285 of file CArray.h.

◆ operator+()

TColor mrpt::utils::operator+ ( const TColor first,
const TColor second 
)

Pairwise addition of their corresponding RGBA members.

Definition at line 26 of file TColor.cpp.

References mrpt::utils::TColor::A, mrpt::utils::TColor::B, mrpt::utils::TColor::G, and mrpt::utils::TColor::R.

◆ operator++() [1/2]

template<typename KEY , typename VALUE , unsigned int NUM_BYTES_HASH_TABLE = 1, unsigned int NUM_HAS_TABLE_COLLISIONS_ALLOWED = 5, typename VECTOR_T = mrpt::utils::CArray< mrpt::utils::CArray<ts_map_entry<KEY,VALUE>, NUM_HAS_TABLE_COLLISIONS_ALLOWED>, 1u << (8*NUM_BYTES_HASH_TABLE)> > class ts_hash_map { public: typedef ts_hash_map<KEY, VALUE, NUM_BYTES_HASH_TABLE, NUM_HAS_TABLE_COLLISIONS_ALLOWED, VECTOR_T> self_t; typedef KEY key_type; typedef ts_map_entry<KEY,VALUE> value_type; typedef VECTOR_T vec_t; struct iterator; struct const_iterator { public: const_iterator() : m_vec(NULL), m_parent(NULL), m_idx_outer(0), m_idx_inner(0) {} const_iterator(const VECTOR_T &vec, const self_t &parent, int idx_outer, int idx_inner) : m_vec(const_cast<VECTOR_T*>(&vec)), m_parent(const_cast<self_t*>(&parent)), m_idx_outer(idx_outer), m_idx_inner(idx_inner) {} const_iterator & operator = (const const_iterator& o) { m_vec = o.m_vec; m_idx_outer = o.m_idx_outer; m_idx_inner = o.m_idx_inner; return *this; } bool operator == (const const_iterator& o) const { return m_vec == o.m_vec && m_idx_outer == o.m_idx_outer && m_idx_inner == o.m_idx_inner; } bool operator != (const const_iterator& o) const { return !(*this==o); } const value_type & operator *() const { return (*m_vec)[m_idx_outer][m_idx_inner]; } const value_type * operator ->() const { return &(*m_vec)[m_idx_outer][m_idx_inner]; } inline const_iterator operator ++(int) { const_iterator aux = *this; ++(*this); return aux; } inline const_iterator& operator ++() { incr(); return *this; } protected: VECTOR_T *m_vec; self_t *m_parent; int m_idx_outer>
iterator mrpt::utils::operator++ ( int  )
inline

A thread-safe (ts) container which minimally emulates a std::map<>'s [] and find() methods but which is implemented as a linear vector indexed by a hash of KEY.

Any custom hash function can be implemented, we don't rely by default on C++11 std::hash<> due to its limitation in some implementations.

This implementation is much more efficient than std::map<> when the most common operation is accesing elements by KEY with find() or [], and is also thread-safe if different threads create entries with different hash values.

The default underlying non-associative container is a "memory-aligned std::vector<>", but it can be changed to a standard vector<> or to a deque<> (to avoid memory reallocations) by changing the template parameter VECTOR_T.

Note
Defined in #include <mrpt/utils/ts_hash_map.h>

Definition at line 97 of file ts_hash_map.h.

◆ operator++() [2/2]

iterator& mrpt::utils::operator++ ( )
inline

Definition at line 98 of file ts_hash_map.h.

◆ operator-()

TColor mrpt::utils::operator- ( const TColor first,
const TColor second 
)

Pairwise substraction of their corresponding RGBA members.

Definition at line 36 of file TColor.cpp.

References mrpt::utils::TColor::A, mrpt::utils::TColor::B, mrpt::utils::TColor::G, and mrpt::utils::TColor::R.

◆ operator<() [1/2]

bool mrpt::mrpt::utils::operator< ( const TMatchingPair a,
const TMatchingPair b 
)

A comparison operator, for sorting lists of TMatchingPair's, first order by this_idx, if equals, by other_idx.

Definition at line 93 of file TMatchingPair.cpp.

◆ operator<() [2/2]

template<class T , std::size_t N>
bool mrpt::utils::operator< ( const CArray< T, N > &  x,
const CArray< T, N > &  y 
)

Definition at line 281 of file CArray.h.

◆ operator<<() [1/25]

std::ostream & mrpt::utils::operator<< ( std::ostream &  o,
const TPixelCoordf p 
)

Prints TPixelCoordf as "(x,y)".

Definition at line 23 of file base/src/utils/types.cpp.

◆ operator<<() [2/25]

std::ostream & mrpt::utils::operator<< ( std::ostream &  o,
const TPixelCoord p 
)

Prints TPixelCoord as "(x,y)".

Definition at line 32 of file base/src/utils/types.cpp.

◆ operator<<() [3/25]

std::ostream & mrpt::utils::operator<< ( std::ostream &  o,
const TColor c 
)

Definition at line 88 of file TColor.cpp.

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

◆ operator<<() [4/25]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream o,
const TColor c 
)

Definition at line 97 of file TColor.cpp.

◆ operator<<() [5/25]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream s,
const mrpt::math::CVectorFloat a 
)

Definition at line 271 of file CStream.cpp.

◆ operator<<() [6/25]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream s,
const mrpt::math::CVectorDouble a 
)

Definition at line 277 of file CStream.cpp.

◆ operator<<() [7/25]

std::ostream & mrpt::utils::operator<< ( std::ostream &  o,
const TColorf c 
)

Definition at line 111 of file TColor.cpp.

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

◆ operator<<() [8/25]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream o,
const TColorf c 
)

Definition at line 120 of file TColor.cpp.

◆ operator<<() [9/25]

CStream& mrpt::utils::operator<< ( mrpt::utils::CStream out,
const COctoMapVoxels::TInfoPerVoxelSet a 
)

Definition at line 230 of file COctoMapVoxels.cpp.

◆ operator<<() [10/25]

CStream& mrpt::utils::operator<< ( mrpt::utils::CStream out,
const COctoMapVoxels::TGridCube a 
)

Definition at line 239 of file COctoMapVoxels.cpp.

◆ operator<<() [11/25]

CStream& mrpt::utils::operator<< ( mrpt::utils::CStream out,
const COctoMapVoxels::TVoxel a 
)

Definition at line 248 of file COctoMapVoxels.cpp.

◆ operator<<() [12/25]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream s,
const char *  a 
)

Definition at line 130 of file CStream.cpp.

References mrpt::utils::CStream::WriteBuffer().

Referenced by mrpt::slam::CICP::ICP_Method_LM().

◆ operator<<() [13/25]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream s,
const std::string str 
)

Definition at line 154 of file CStream.cpp.

References mrpt::utils::CStream::WriteBuffer().

◆ operator<<() [14/25]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream s,
const vector_int a 
)

Definition at line 264 of file CStream.cpp.

References mrpt::utils::detail::writeStdVectorToStream().

◆ operator<<() [15/25]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream s,
const vector_uint a 
)

Definition at line 265 of file CStream.cpp.

References mrpt::utils::detail::writeStdVectorToStream().

◆ operator<<() [16/25]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream s,
const vector_word a 
)

Definition at line 266 of file CStream.cpp.

References mrpt::utils::detail::writeStdVectorToStream().

◆ operator<<() [17/25]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream s,
const vector_signed_word a 
)

Definition at line 267 of file CStream.cpp.

References mrpt::utils::detail::writeStdVectorToStream().

◆ operator<<() [18/25]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream s,
const vector_long a 
)

Definition at line 268 of file CStream.cpp.

References mrpt::utils::detail::writeStdVectorToStream().

◆ operator<<() [19/25]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream s,
const vector_byte a 
)

Definition at line 269 of file CStream.cpp.

References mrpt::utils::detail::writeStdVectorToStream().

◆ operator<<() [20/25]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream s,
const vector_signed_byte a 
)

Definition at line 270 of file CStream.cpp.

References mrpt::utils::detail::writeStdVectorToStream().

◆ operator<<() [21/25]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream out,
const vector_bool a 
)

Definition at line 139 of file CStream.cpp.

References mrpt::utils::CStream::WriteBuffer().

◆ operator<<() [22/25]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream s,
const std::vector< std::string > &  vec 
)

Definition at line 537 of file CStream.cpp.

◆ operator<<() [23/25]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream s,
const std::vector< size_t > &  a 
)

Definition at line 310 of file CStream.cpp.

References mrpt::utils::detail::writeStdVectorToStream().

◆ operator<<() [24/25]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream s,
const std::vector< float > &  a 
)

Definition at line 262 of file CStream.cpp.

References mrpt::utils::detail::writeStdVectorToStream().

◆ operator<<() [25/25]

CStream & mrpt::utils::operator<< ( mrpt::utils::CStream s,
const std::vector< double > &  a 
)

Definition at line 263 of file CStream.cpp.

References mrpt::utils::detail::writeStdVectorToStream().

◆ operator<=()

template<class T , std::size_t N>
bool mrpt::utils::operator<= ( const CArray< T, N > &  x,
const CArray< T, N > &  y 
)

Definition at line 293 of file CArray.h.

◆ operator==() [1/5]

bool mrpt::utils::operator== ( const TColor first,
const TColor second 
)

◆ operator==() [2/5]

bool mrpt::mrpt::utils::operator== ( const TMatchingPair a,
const TMatchingPair b 
)

A comparison operator.

Definition at line 101 of file TMatchingPair.cpp.

◆ operator==() [3/5]

bool mrpt::mrpt::utils::operator== ( const TMatchingPairList a,
const TMatchingPairList b 
)

A comparison operator.

Definition at line 106 of file TMatchingPair.cpp.

◆ operator==() [4/5]

bool mrpt::utils::operator== ( const mrpt::utils::TCamera a,
const mrpt::utils::TCamera b 
)

Definition at line 191 of file TCamera.cpp.

◆ operator==() [5/5]

template<class T , std::size_t N>
bool mrpt::utils::operator== ( const CArray< T, N > &  x,
const CArray< T, N > &  y 
)

Definition at line 277 of file CArray.h.

◆ operator>()

template<class T , std::size_t N>
bool mrpt::utils::operator> ( const CArray< T, N > &  x,
const CArray< T, N > &  y 
)

Definition at line 289 of file CArray.h.

◆ operator>=()

template<class T , std::size_t N>
bool mrpt::utils::operator>= ( const CArray< T, N > &  x,
const CArray< T, N > &  y 
)

Definition at line 297 of file CArray.h.

◆ operator>>() [1/31]

::mrpt::utils::CStream& mrpt::utils::operator>> ( mrpt::utils::CStream in,
TStereoCameraPtr &  pObj 
)

◆ operator>>() [2/31]

::mrpt::utils::CStream& mrpt::utils::operator>> ( mrpt::utils::CStream in,
CTypeSelectorPtr &  pObj 
)

◆ operator>>() [3/31]

::mrpt::utils::CStream& mrpt::utils::operator>> ( mrpt::utils::CStream in,
CPropertiesValuesListPtr &  pObj 
)

◆ operator>>() [4/31]

::mrpt::utils::CStream& mrpt::utils::operator>> ( mrpt::utils::CStream in,
CMemoryChunkPtr &  pObj 
)

◆ operator>>() [5/31]

::mrpt::utils::CStream& mrpt::utils::operator>> ( mrpt::utils::CStream in,
CStringListPtr &  pObj 
)

◆ operator>>() [6/31]

::mrpt::utils::CStream& mrpt::utils::operator>> ( mrpt::utils::CStream in,
CMHPropertiesValuesListPtr &  pObj 
)

◆ operator>>() [7/31]

::mrpt::utils::CStream& mrpt::utils::operator>> ( mrpt::utils::CStream in,
CSimpleDatabasePtr &  pObj 
)

◆ operator>>() [8/31]

::mrpt::utils::CStream& mrpt::utils::operator>> ( mrpt::utils::CStream in,
TCameraPtr &  pObj 
)

◆ operator>>() [9/31]

::mrpt::utils::CStream& mrpt::utils::operator>> ( mrpt::utils::CStream in,
CSimpleDatabaseTablePtr &  pObj 
)

◆ operator>>() [10/31]

::mrpt::utils::CStream& mrpt::utils::operator>> ( mrpt::utils::CStream in,
CImagePtr &  pObj 
)

◆ operator>>() [11/31]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream i,
TColor c 
)

Definition at line 103 of file TColor.cpp.

◆ operator>>() [12/31]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream in,
mrpt::math::CVectorDouble a 
)

Definition at line 301 of file CStream.cpp.

◆ operator>>() [13/31]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream in,
mrpt::math::CVectorFloat a 
)

Definition at line 294 of file CStream.cpp.

◆ operator>>() [14/31]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream i,
TColorf c 
)

Definition at line 126 of file TColor.cpp.

◆ operator>>() [15/31]

CStream& mrpt::utils::operator>> ( mrpt::utils::CStream in,
COctoMapVoxels::TInfoPerVoxelSet a 
)

Definition at line 234 of file COctoMapVoxels.cpp.

◆ operator>>() [16/31]

CStream& mrpt::utils::operator>> ( mrpt::utils::CStream in,
COctoMapVoxels::TGridCube a 
)

Definition at line 243 of file COctoMapVoxels.cpp.

◆ operator>>() [17/31]

CStream& mrpt::utils::operator>> ( mrpt::utils::CStream in,
COctoMapVoxels::TVoxel a 
)

Definition at line 252 of file COctoMapVoxels.cpp.

◆ operator>>() [18/31]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream in,
char *  a 
)

Definition at line 341 of file CStream.cpp.

References ASSERT_.

◆ operator>>() [19/31]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream in,
std::string str 
)

Definition at line 330 of file CStream.cpp.

◆ operator>>() [20/31]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream in,
vector_int a 
)

Definition at line 287 of file CStream.cpp.

References mrpt::utils::detail::readStdVectorToStream().

◆ operator>>() [21/31]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream in,
vector_uint a 
)

Definition at line 288 of file CStream.cpp.

References mrpt::utils::detail::readStdVectorToStream().

◆ operator>>() [22/31]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream in,
vector_word a 
)

Definition at line 289 of file CStream.cpp.

References mrpt::utils::detail::readStdVectorToStream().

◆ operator>>() [23/31]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream in,
vector_signed_word a 
)

Definition at line 290 of file CStream.cpp.

References mrpt::utils::detail::readStdVectorToStream().

◆ operator>>() [24/31]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream in,
vector_long a 
)

Definition at line 291 of file CStream.cpp.

References mrpt::utils::detail::readStdVectorToStream().

◆ operator>>() [25/31]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream in,
vector_byte a 
)

Definition at line 292 of file CStream.cpp.

References mrpt::utils::detail::readStdVectorToStream().

◆ operator>>() [26/31]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream in,
vector_signed_byte a 
)

Definition at line 293 of file CStream.cpp.

References mrpt::utils::detail::readStdVectorToStream().

◆ operator>>() [27/31]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream in,
vector_bool a 
)

Definition at line 314 of file CStream.cpp.

◆ operator>>() [28/31]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream in,
std::vector< std::string > &  a 
)

Definition at line 544 of file CStream.cpp.

◆ operator>>() [29/31]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream s,
std::vector< float > &  a 
)

Definition at line 285 of file CStream.cpp.

References mrpt::utils::detail::readStdVectorToStream().

◆ operator>>() [30/31]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream s,
std::vector< double > &  a 
)

Definition at line 286 of file CStream.cpp.

References mrpt::utils::detail::readStdVectorToStream().

◆ operator>>() [31/31]

CStream & mrpt::utils::operator>> ( mrpt::utils::CStream s,
std::vector< size_t > &  a 
)

Definition at line 311 of file CStream.cpp.

References mrpt::utils::detail::readStdVectorToStream().

◆ operator[]()

VALUE& mrpt::utils::operator[] ( const KEY &  key)

◆ pending_class_registers()

CThreadSafeQueue< TRegisterFunction > & mrpt::mrpt::utils::pending_class_registers ( )

Definition at line 43 of file internal_class_registry.cpp.

References pending_class_registers_modified.

Referenced by registerAllPendingClasses().

◆ pending_class_registers_count()

std::atomic< int > & mrpt::mrpt::utils::pending_class_registers_count ( )

Definition at line 36 of file internal_class_registry.cpp.

Referenced by registerAllPendingClasses().

◆ printf_vector()

template<typename T >
void mrpt::utils::printf_vector ( const char *  fmt,
const std::vector< T > &  V 
)

Prints a vector in the format [A,B,C,...] to std::cout, and the fmt string for each vector element.

Definition at line 54 of file printf_vector.h.

References sprintf_vector().

Referenced by mrpt::hmtslam::CHMTSLAM::TMessageLSLAMfromAA::dumpToConsole().

◆ RAD2DEG() [1/2]

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

Radians to degrees.

Definition at line 88 of file bits.h.

References M_PI.

Referenced by TEST().

◆ RAD2DEG() [2/2]

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

Radians to degrees.

Definition at line 90 of file bits.h.

References M_PIf.

◆ reduced_hash() [1/4]

void mrpt::utils::reduced_hash ( const std::string value,
uint8_t hash 
)

hash function used by ts_hash_map. Uses dbj2 method

Definition at line 27 of file ts_hash_map.cpp.

References SELBYTE0, SELBYTE1, SELBYTE2, and SELBYTE3.

Referenced by find(), operator[](), reduced_hash(), and simple_test_hash_string().

◆ reduced_hash() [2/4]

void mrpt::utils::reduced_hash ( const std::string value,
uint16_t hash 
)

hash function used by ts_hash_map. Uses dbj2 method

Definition at line 33 of file ts_hash_map.cpp.

References MAKEWORD16B, reduced_hash(), SELBYTE0, SELBYTE1, SELBYTE2, and SELBYTE3.

◆ reduced_hash() [3/4]

void mrpt::utils::reduced_hash ( const std::string value,
uint32_t hash 
)

hash function used by ts_hash_map. Uses dbj2 method

Definition at line 40 of file ts_hash_map.cpp.

References reduced_hash().

◆ reduced_hash() [4/4]

void mrpt::utils::reduced_hash ( const std::string value,
uint64_t hash 
)

hash function used by ts_hash_map. Uses dbj2 method

Definition at line 17 of file ts_hash_map.cpp.

◆ registerAllPendingClasses()

void mrpt::mrpt::utils::registerAllPendingClasses ( )

◆ reverseBytes()

template<class T >
void 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 162 of file bits.h.

References reverseBytesInPlace().

Referenced by get_binary_item().

◆ reverseBytesInPlace() [1/11]

void mrpt::utils::reverseBytesInPlace ( bool &  v_in_out)

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

Definition at line 75 of file bits.cpp.

Referenced by reverseBytes().

◆ reverseBytesInPlace() [2/11]

void mrpt::utils::reverseBytesInPlace ( uint8_t v_in_out)

Definition at line 79 of file bits.cpp.

◆ reverseBytesInPlace() [3/11]

void mrpt::utils::reverseBytesInPlace ( int8_t v_in_out)

Definition at line 82 of file bits.cpp.

◆ reverseBytesInPlace() [4/11]

void mrpt::utils::reverseBytesInPlace ( uint16_t v_in_out)

Definition at line 86 of file bits.cpp.

References reverseBytesInPlace_2b().

◆ reverseBytesInPlace() [5/11]

void mrpt::utils::reverseBytesInPlace ( int16_t v_in_out)

Definition at line 90 of file bits.cpp.

References reverseBytesInPlace_2b().

◆ reverseBytesInPlace() [6/11]

void mrpt::utils::reverseBytesInPlace ( uint32_t v_in_out)

Definition at line 94 of file bits.cpp.

References reverseBytesInPlace_4b().

◆ reverseBytesInPlace() [7/11]

void mrpt::utils::reverseBytesInPlace ( int32_t v_in_out)

Definition at line 98 of file bits.cpp.

References reverseBytesInPlace_4b().

◆ reverseBytesInPlace() [8/11]

void mrpt::utils::reverseBytesInPlace ( uint64_t v_in_out)

Definition at line 102 of file bits.cpp.

References reverseBytesInPlace_8b().

◆ reverseBytesInPlace() [9/11]

void mrpt::utils::reverseBytesInPlace ( int64_t v_in_out)

Definition at line 106 of file bits.cpp.

References reverseBytesInPlace_8b().

◆ reverseBytesInPlace() [10/11]

void mrpt::utils::reverseBytesInPlace ( float &  v_in_out)

Definition at line 110 of file bits.cpp.

References reverseBytesInPlace_4b().

◆ reverseBytesInPlace() [11/11]

void mrpt::utils::reverseBytesInPlace ( double &  v_in_out)

Definition at line 114 of file bits.cpp.

References reverseBytesInPlace_8b().

◆ saturate()

template<typename T >
void mrpt::utils::saturate ( T &  var,
const T  sat_min,
const T  sat_max 
)
inline

Saturate the value of var (the variable gets modified) so it does not get out of [min,max].

Definition at line 181 of file bits.h.

◆ saturate_val()

template<typename T >
T mrpt::utils::saturate_val ( const T &  value,
const T  sat_min,
const T  sat_max 
)
inline

Like saturate() but it returns the value instead of modifying the variable.

Definition at line 187 of file bits.h.

◆ sign()

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

◆ signWithZero()

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

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

Definition at line 108 of file bits.h.

References sign().

◆ sprintf_vector() [1/2]

template<typename T >
std::string mrpt::utils::sprintf_vector ( const char *  fmt,
const std::vector< T > &  V 
)

Generates a string for a vector in the format [A,B,C,...] to std::cout, and the fmt string for each vector element.

Definition at line 25 of file printf_vector.h.

References mrpt::format().

Referenced by mrpt::math::CLevenbergMarquardtTempl< VECTORTYPE, USERPARAM >::execute(), mrpt::nav::CAbstractPTGBasedReactive::TNavigationParamsPTG::getAsText(), and printf_vector().

◆ sprintf_vector() [2/2]

template<typename Derived >
std::string mrpt::utils::sprintf_vector ( const char *  fmt,
const Eigen::MatrixBase< Derived > &  V 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 39 of file printf_vector.h.

References mrpt::format().

◆ ts_hash_map()

mrpt::utils::ts_hash_map ( )

< Default constructor */

Definition at line 109 of file ts_hash_map.h.

◆ vector_strong_clear()

template<class VECTOR_T >
void mrpt::utils::vector_strong_clear ( VECTOR_T &  v)
inline

Variable Documentation

◆ m_size

size_t mrpt::utils::m_size
private

Number of elements accessed with write access so far.

Definition at line 103 of file ts_hash_map.h.

Referenced by clear(), empty(), and operator[]().

◆ m_vec

vec_t mrpt::utils::m_vec
private

The actual container.

Definition at line 99 of file ts_hash_map.h.

Referenced by begin(), clear(), end(), find(), and operator[]().

◆ MRPT_GLOBAL_UNITTEST_SRC_DIR

std::string mrpt::utils::MRPT_GLOBAL_UNITTEST_SRC_DIR

◆ MRPT_SAVE_NAME_PADDING

int mrpt::utils::MRPT_SAVE_NAME_PADDING = 50

◆ MRPT_SAVE_VALUE_PADDING

int mrpt::utils::MRPT_SAVE_VALUE_PADDING = 20

◆ pending_class_registers_modified

volatile bool mrpt::mrpt::utils::pending_class_registers_modified = false

Set to true if pending_class_registers() has been called after registerAllPendingClasses(). Startup value is false.

Definition at line 33 of file internal_class_registry.cpp.

Referenced by pending_class_registers(), and registerAllPendingClasses().




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