| 1744 | inline const CHAR* name() const { return "keep_random_fraction"; }; |
| 1745 | inline I32 get_command(CHAR* string) const { return sprintf(string, "-%s %g ", name(), fraction); }; |
| 1746 | inline BOOL filter(const LASpoint* point) |
| 1747 | { |
| 1748 | srand(seed); |
| 1749 | seed = rand(); |
| 1750 | return ((F32)seed / (F32)RAND_MAX) > fraction; |
| 1751 | }; |
| 1752 | void reset() { seed = requested_seed; }; |
| 1753 | LAScriterionKeepRandomFraction(F32 fraction) { requested_seed = seed = 0; this->fraction = fraction; }; |
| 1754 | LAScriterionKeepRandomFraction(U32 seed, F32 fraction) { requested_seed = this->seed = seed; this->fraction = fraction; }; |
nothing calls this directly
no outgoing calls
no test coverage detected