Description Usage Arguments Details Value Author(s) References See Also Examples
This function is the first step for Adaptive Kruskal algorithm for generating aggregate centers for Thiessen polygons with the aim to obtain the cluster id for each sample point.
1 | exeCluster(samples, tdist)
|
samples |
Data frame for samples with the columns of coordinates (column name: x and y) |
tdist |
The target distance for generation of the clusters. If the minimun distance between any two samples respectively from two different clusters is bigger than tdist, clustering stops and return the results. |
The Kruskal algorithm is used to obtain the sparse central points from dense points for efficient generation of Thiessen polygons for spatial effect modeling. This function aims to obtain the cluster id for each sample point. We used the union-find method for linear time complexity.
vector format: cluster id for each sample (same sequence as the input)
Lianfa Li lspatial@gmail.com
Thomas, C.; Leiserson, C.; Rivest, R.; Stein, C., Introduction To Algorithms (Third ed.). MIT Press: 2009
getClusterCt
, ~~~
1 2 | samplePnt=data.frame(x=runif(100,1,100),y=runif(100,1,100))
clusterId=exeCluster(samplePnt,10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.