Introduction
PointSampler is a lightweight, header-only C++ library for point sampling in arbitrary dimensions. It offers generic and reusable algorithms for:
- Random point generation
- Distance-based filtering
- Utility operations on points
The library is template-based and dimension-independent, making it suitable for 2D, 3D, or higher-dimensional spaces.
Usage Example
std::vector< Point< T, N > > random(size_t count, const std::array< std::pair< T, T >, N > &axis_ranges, std::optional< unsigned int > seed=std::nullopt)
Generates a specified number of uniformly distributed random points in N-dimensional space.
Definition random.hpp:66
std::vector< Point< T, N > > distance_rejection_filter(const std::vector< Point< T, N > > &points, T min_dist)
Filters a set of points using a greedy distance-based rejection.
Definition distance_rejection_filter.hpp:35
Categories
- Random Sampling Functions
- Filtering Functions
- Clustering
- Data
- Point representation
Repository
GitHub: https://github.com/otto-link/PointSampler