Performance OSMDroid RadiusMarkerClusterer的复杂性是什么

Performance OSMDroid RadiusMarkerClusterer的复杂性是什么,performance,big-o,osmdroid,markerclusterer,Performance,Big O,Osmdroid,Markerclusterer,我对big-O计算有点生疏,当时我正试图找出Osmdroid RadiusMarker群集的复杂性。java文档说: Radius-based Clustering algorithm: create a cluster using the first point from the cloned list. All points that are found within the neighborhood are added to this cluster. Then all the n

我对big-O计算有点生疏,当时我正试图找出Osmdroid RadiusMarker群集的复杂性。java文档说:

 Radius-based Clustering algorithm:
 create a cluster using the first point from the cloned list.
 All points that are found within the neighborhood are added to this cluster.
 Then all the neighbors and the main point are removed from the list of points.
 It continues until the list is empty.
群集算法如下所示:

 private StaticCluster createCluster(Marker m, MapView mapView) {
    GeoPoint clusterPosition = m.getPosition();

    StaticCluster cluster = new StaticCluster(clusterPosition);
    cluster.add(m);

    mClonedMarkers.remove(m);

    if (mapView.getZoomLevel() > mMaxClusteringZoomLevel) {
        //above max level => block clustering:
        return cluster;
    }

    Iterator<Marker> it = mClonedMarkers.iterator();
    while (it.hasNext()) {
        Marker neighbour = it.next();
        int distance = clusterPosition.distanceTo(neighbour.getPosition());
        if (distance <= mRadiusInMeters) {
            cluster.add(neighbour);
            it.remove();
        }
    }

    return cluster;
}
private StaticCluster createCluster(标记m,MapView MapView){
GeoPoint clusterPosition=m.getPosition();
StaticCluster=新的StaticCluster(clusterPosition);
增加(m);
mClonedMarkers.移除(m);
if(mapView.getZoomLevel()>mMaxClusteringZoomLevel){
//高于最大级别=>块群集:
返回簇;
}
迭代器it=mClonedMarkers.Iterator();
while(it.hasNext()){
Marker nexter=it.next();
int distance=clusterPosition.distanceTo(neighbor.getPosition());

如果(距离自
m
可以非常小,那么O(n^2)。自
m
可以非常小,那么O(n^2)。