56 inPlaceFilter(output);
64 std::minstd_rand randomNumberGenerator;
67 std::random_device randomDevice;
68 randomNumberGenerator = std::minstd_rand(randomDevice());
72 randomNumberGenerator = std::minstd_rand(seed);
75 switch(randomSamplingMethod)
79 const float randomNumberRange{
static_cast<float>(randomNumberGenerator.max() - randomNumberGenerator.min())};
80 return Eigen::VectorXf::NullaryExpr(nbPoints, [&](
float){
return static_cast<float>(randomNumberGenerator() / randomNumberRange);});
84 std::uniform_real_distribution<float> distribution(0, 1);
85 return Eigen::VectorXf::NullaryExpr(nbPoints, [&](
float){
return distribution(randomNumberGenerator);});
95 const size_t nbPointsIn = cloud.
features.cols();
96 const size_t nbPointsOut = nbPointsIn * prob;
98 const Eigen::VectorXf randomNumbers{sampleRandomIndices(nbPointsIn)};
100 for (
size_t i{0u}; i < nbPointsIn && j<=nbPointsOut; ++i)
102 if (randomNumbers(i) < prob)