T
- the element-type in the collection.public class SpatiallySeparate<T> extends Object
Each element must provide a corresponding bounding-box.
Any objects whose bounding-boxes intersect belong to the same cluster, but otherwise not.
This is similar to a simplified DBSCAN algorithm.
Constructor and Description |
---|
SpatiallySeparate(java.util.function.Function<T,BoundingBox> extractBoundingBox) |
Modifier and Type | Method and Description |
---|---|
List<Set<T>> |
separate(Collection<T> elements)
Splits a collection of elements into spatially separate clusters, without consuming
all elements in
elements . |
public SpatiallySeparate(java.util.function.Function<T,BoundingBox> extractBoundingBox)
public List<Set<T>> separate(Collection<T> elements)
elements
.elements
- the collection of elements to separate.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.