gr::Utils Namespace Reference

Classes

struct  CRTP
 CRTP class designed by Gael Guennebaud Source: http://disq.us/p/1tf4a7l https://www.onlinegdb.com/rJEhwUc-m. More...
 
struct  LCPMetric
 Implementation of the Largest Common PointSet metric. More...
 
class  Logger
 
struct  OneRingNeighborhood
 Compute the 3^dim neighborhood for a cell This implementation is not efficient and must be improved e.g., do no allocate any array, just call a function with the ids. More...
 
class  Timer
 
struct  WeightedLCPMetric
 Implementation of a weighted variant of the Largest Common PointSet metric. More...
 

Enumerations

enum  LogLevel { NoLog = 0, ErrorReport = 1, Verbose = 2 }
 

Functions

template<typename PointContainer , typename VecContainer >
static void CleanInvalidNormals (PointContainer &v, VecContainer &normals)
 
template<typename baseT , typename expoT >
constexpr baseT POW (baseT base, expoT expo)
 Compile time pow. More...
 
template<typename PointContainer >
static void TransformPointCloud (PointContainer &v, Eigen::Ref< const Eigen::Matrix< typename PointContainer::value_type::Scalar, 4, 4 >> tr)
 
template<bool validate, class ndIndexT , class IndexT , class SizeT >
constexpr IndexT UnrollIndexLoop (const ndIndexT &coord, IndexT cdim, SizeT gsize)
 Convert a normalized n-d vector to a linear index in a uniform regular grid This function is recursive, and unrolled at compile time (loop over n). More...
 
template<bool validate, class ndIndexT , class IndexT , class SizeT >
constexpr IndexT UnrollIndexLoop (const ndIndexT &coord, const ndIndexT &offset, IndexT cdim, SizeT gsize)
 Convert a normalized n-d vector to a linear index in a uniform regular grid, moved by moved by an offset defined as a integer move in the n-d grid. More...
 

Enumeration Type Documentation

Enumerator
NoLog 
ErrorReport 
Verbose 

Function Documentation

template<typename PointContainer , typename VecContainer >
static void gr::Utils::CleanInvalidNormals ( PointContainer &  v,
VecContainer &  normals 
)
inlinestatic
template<typename baseT , typename expoT >
constexpr baseT gr::Utils::POW ( baseT  base,
expoT  expo 
)

Compile time pow.

template<typename PointContainer >
static void gr::Utils::TransformPointCloud ( PointContainer &  v,
Eigen::Ref< const Eigen::Matrix< typename PointContainer::value_type::Scalar, 4, 4 >>  tr 
)
inlinestatic
template<bool validate, class ndIndexT , class IndexT , class SizeT >
constexpr IndexT gr::Utils::UnrollIndexLoop ( const ndIndexT &  coord,
IndexT  cdim,
SizeT  gsize 
)
inline

Convert a normalized n-d vector to a linear index in a uniform regular grid This function is recursive, and unrolled at compile time (loop over n).

Parameters
coordInput coordinates defined in the normalized n-hypercube.
cdimWorking dimension, must be called with n.
gsizeDimension of the grid, must be consistent in all dimensions
Template Parameters
validateEnable or disable the range validation
PointTType of the input points (deduced)
IndexTIndex type (deduced)
IndexTSize type (deduced)
See also
internal::IndexValidator for the validation procedure

+ Here is the call graph for this function:

template<bool validate, class ndIndexT , class IndexT , class SizeT >
constexpr IndexT gr::Utils::UnrollIndexLoop ( const ndIndexT &  coord,
const ndIndexT &  offset,
IndexT  cdim,
SizeT  gsize 
)
inline

Convert a normalized n-d vector to a linear index in a uniform regular grid, moved by moved by an offset defined as a integer move in the n-d grid.

This function is recursive, and unrolled at compile time (loop over n). In addition, it allows to offset the input coordinates.

Parameters
coordInput coordinates defined in the normalized n-hypercube.
cdimWorking dimension, must be called with n.
gsizeDimension of the grid, must be consistent in all dimensions
See also
UnrollIndexLoop<class PointT>

+ Here is the call graph for this function: