public class HilbertSort extends Object
During the insertion of points into a TIN, the incremental TIN locates the triangle the contains the insertion point through a "walk" method that traverses the mesh. The walk always on are the triangle that it visited on the previous insertion. Thus, if the insertion vertices are ordered so that subsequent points are close together, the walk is short and the insertion proceeds more efficiently.
The Hilbert sort orders points according to their ranking in a Hilbert space-filling curve. One of the characteristics of Hilbert functions is that each ordered point is always close to its predecessor.
The code for the Hilbert ranking is based on the Lam&Shapiro method as described in "Hackers Delight (2nd ed.)" by H. Warren (2013)
Constructor and Description |
---|
HilbertSort() |
Modifier and Type | Method and Description |
---|---|
boolean |
sort(List<Vertex> vertexList)
Sort the vertices in the list by their Hilbert ranking.
|
public boolean sort(List<Vertex> vertexList)
vertexList
- the input vertex list.Copyright © 2021. All rights reserved.