Package elki.math.geometry
Class AlphaShape
- java.lang.Object
-
- elki.math.geometry.AlphaShape
-
@Reference(authors="H. Edelsbrunner, D. G. Kirkpatrick, R. Seidel", title="On the shape of a set of points in the plane", booktitle="IEEE Trans. Inf. Theory 29(4)", url="https://doi.org/10.1109/TIT.1983.1056714", bibkey="DBLP:journals/tit/EdelsbrunnerKS83") public class AlphaShape extends java.lang.Object
Compute the alpha-shape of a point set, using Delaunay triangulation.Reference:
H. Edelsbrunner, D. G. Kirkpatrick, R. Seidel
On the shape of a set of points in the plane
IEEE Trans. Inf. Theory 29(4)- Since:
- 0.5.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private double
alpha2
Alpha shapeprivate java.util.ArrayList<SweepHullDelaunay2D.Triangle>
delaunay
Delaunay triangulationprivate java.util.List<double[]>
points
Points
-
Constructor Summary
Constructors Constructor Description AlphaShape(java.util.List<double[]> points, double alpha)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addEdge(java.util.List<IntegerArray> open, int a, int b)
Add an edge to the corresponding polygon.private void
checkNeighbors(java.util.List<IntegerArray> open, long[] visited, IntegerArray stack)
java.util.List<Polygon>
compute()
Compute the alpha shape.
-
-
-
Field Detail
-
alpha2
private double alpha2
Alpha shape
-
points
private java.util.List<double[]> points
Points
-
delaunay
private java.util.ArrayList<SweepHullDelaunay2D.Triangle> delaunay
Delaunay triangulation
-
-
Method Detail
-
compute
public java.util.List<Polygon> compute()
Compute the alpha shape.- Returns:
- polygons
-
checkNeighbors
private void checkNeighbors(java.util.List<IntegerArray> open, long[] visited, IntegerArray stack)
-
addEdge
private void addEdge(java.util.List<IntegerArray> open, int a, int b)
Add an edge to the corresponding polygon. This handles holes.- Parameters:
open
- List of open polygonsa
- previous pointb
- next point
-
-