This function is the second step for Adaptive Kruskal algorithm for generating aggregate centers for Thiessen polygons with the aim to obtain the central point for each cluster.
getClusterCt(samples, clsInf)
Data frame for samples with the columns of coordinates (column name: x and y)
Cluster results obtained from the fucntion,exeCluster
vector format: coordinates (x and y) for each cluster
Retrieve the central point for each cluster.
Thomas, C.; Leiserson, C.; Rivest, R.; Stein, C., Introduction To Algorithms (Third ed.). MIT Press: 2009
exeCluster
, ~~~
# NOT RUN {
samplePnt=data.frame(x=runif(100,1,100),y=runif(100,1,100))
clusterId=exeCluster(samplePnt,10)
clscenters=getClusterCt(samplePnt,clusterId)
# }
Run the code above in your browser using DataLab