exeCluster1D: Efficient Clustering Using Union-Find to Obtain the Clusters...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

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.

Usage

1
exeCluster1D(samples, tdist)

Arguments

samples

Vector for samples with single vals

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.

Details

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.

Value

vector format: cluster id for each sample (same sequence as the input)

Author(s)

Lianfa Li lspatial@gmail.com

References

Thomas, C.; Leiserson, C.; Rivest, R.; Stein, C., Introduction To Algorithms (Third ed.). MIT Press: 2009

See Also

getClusterCt, ~~~

Examples

1
2
samplePnt=runif(100,1,100)
clusterId=exeCluster1D(samplePnt,10)

sptemExp documentation built on July 7, 2019, 9:02 a.m.