30 #ifndef RTABMAP_FLANN_SAMPLING_H_ 31 #define RTABMAP_FLANN_SAMPLING_H_ 46 for (
size_t i=0; i<size; ++i) {
52 r =
static_cast<size_t>(rand_unique.
next());
56 std::copy(src, src+srcMatrix.
cols, dest);
58 src = srcMatrix[srcMatrix.
rows-i-1];
60 std::copy(src, src+srcMatrix.
cols, dest);
64 srcMatrix.
rows -= size;
int rand_int(int high=RAND_MAX, int low=0)
Matrix< T > random_sample(Matrix< T > &srcMatrix, size_t size, bool remove=false)