48 seed = this->
template get<size_t>(
"seed");
52 seed =
static_cast<size_t>(1);
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 DataPoints filter(const DataPoints &input)
Apply filters to input point cloud. This is the non-destructive version and returns a copy...
virtual void inPlaceFilter(DataPoints &cloud)
Apply these filters to a point cloud without copying.
MaxPointCountDataPointsFilter(const Parameters ¶ms=Parameters())
unsigned getNbPoints() const
Return the number of points contained in the point cloud.
Maximum number of points.
Parametrizable::Parameters Parameters
Functions and classes that are dependant on scalar type are defined in this templatized class...
void swapCols(Index iCol, Index jCol)
Swap column i and j in the point cloud, swap also features and descriptors if any. Assumes sizes are similar.
const M::mapped_type & get(const M &m, const typename M::key_type &k)
The superclass of classes that are constructed using generic parameters. This class provides the para...
An exception thrown when one tries to fetch the value of an unexisting parameter. ...
void conservativeResize(Index pointCount)
Resize the cloud to pointCount points, conserving existing ones.
PM::DataPointsFilter DataPointsFilter