MRPT  1.9.9
mrpt::math::detail::VicinityTraits< T > Class Template Reference

Detailed Description

template<typename T>
class mrpt::math::detail::VicinityTraits< T >

The purpose of this class is to model traits for containers, so that they can be used as return values for the function CMatrixTemplate::getVicinity.

This class is NOT defined for any base container, because correctness would not be guaranteed. Instead, each class must define its own specialization of the template, containing two functions:

  • static void initialize(container<T>,size_t N): must reserve space to allow at least the insertion of N*N elements, in a square fashion when appliable.
  • static void insertInContainer(container<T>,size_t r,size_t c,const T &): must insert the given element in the container. Whenever it's possible, it must insert it in the (r,c) coordinates. For linear containers, the vicinity functions are guaranteed to insert elements in order, i.e., starting from the top and reading from left to right.

Definition at line 153 of file math_frwds.h.

#include <mrpt/math/math_frwds.h>




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020