Go to the documentation of this file.
48 seed = this->
template get<size_t>(
"seed");
52 seed =
static_cast<size_t>(1);
61 inPlaceFilter(output);
69 const size_t N{
static_cast<size_t>(cloud.
getNbPoints() - 1)};
73 std::minstd_rand randomNumberGenerator(
static_cast<std::uint_fast32_t
>(seed));
74 std::uniform_real_distribution<float> distribution{0, 1};
76 for (
size_t j{0u}; j < maxCount; ++j)
79 const size_t index{j +
static_cast<size_t>((N - j) * distribution(randomNumberGenerator))};
virtual void inPlaceFilter(DataPoints &cloud)
Apply these filters to a point cloud without copying.
PM::DataPointsFilter DataPointsFilter
void swapCols(Index iCol, Index jCol)
Swap column i and j in the point cloud, swap also features and descriptors if any....
Functions and classes that are dependant on scalar type are defined in this templatized class.
virtual DataPoints filter(const DataPoints &input)
Apply filters to input point cloud. This is the non-destructive version and returns a copy.
An exception thrown when one tries to fetch the value of an unexisting parameter.
unsigned getNbPoints() const
Return the number of points contained in the point cloud.
Parametrizable::Parameters Parameters
The superclass of classes that are constructed using generic parameters. This class provides the para...
const M::mapped_type & get(const M &m, const typename M::key_type &k)
MaxPointCountDataPointsFilter(const Parameters ¶ms=Parameters())
void conservativeResize(Index pointCount)
Resize the cloud to pointCount points, conserving existing ones.
Maximum number of points.