Type Alias spade::HierarchyHintGenerator

source ·
pub type HierarchyHintGenerator<S> = HierarchyHintGeneratorWithBranchFactor<S, 16>;
Expand description

A hint generator based on a hierarchy of triangulations optimized for randomly accessing elements of the triangulation.

Using this hint generator results in a insertion and lookup performance of O(log(n)) by keeping a few layers of sparsely populated Delaunay Triangulations. These layers can then be quickly traversed before diving deeper into the next, more detailed layer where the search is then refined.

Type parameters

  • S: The scalar type used by the triangulation

Example

use spade::{Point2, Triangulation, DelaunayTriangulation, HierarchyHintGenerator};

pub type HierarchyTriangulation = DelaunayTriangulation<Point2<f64>, (), (), (), HierarchyHintGenerator<f64>>;

let mut triangulation = HierarchyTriangulation::new();
// Start using the triangulation, e.g. by inserting vertices
triangulation.insert(Point2::new(0.0, 0.0));

Aliased Type§

struct HierarchyHintGenerator<S> { /* private fields */ }