
Select Target Number of Points for Spatial Thinning
Source:R/thinning_algorithm.R
select_target_points.Rd
This function selects a specified number of points from a spatial dataset while maximizing the distance between selected points.
Arguments
- distance_matrix
A matrix of pairwise distances between points.
- target_points
An integer specifying the number of points to retain.
- thin_dist
A positive numeric value representing the thinning distance in kilometers.
- trials
A positive integer specifying the number of thinning trials to perform. Default is 10.
- all_trials
A logical value indicating whether to return results of all attempts (`TRUE`) or only the best attempt with the most points retained (`FALSE`). Default is `FALSE`.