1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
use crate;
use SparseSecondaryMap;
// =============================================================================
// SLOTMAP SECONDARY MAPS FOR AUXILIARY DATA
// =============================================================================
/// Sparse secondary map for tracking auxiliary data associated with cells.
///
/// This is the idiomatic way to associate temporary data with `SlotMap` keys during algorithms.
/// Only stores entries for cells that have associated data (sparse representation).
///
/// # Performance Benefits
///
/// - **Memory efficient**: Only allocates for cells with data (vs dense array)
/// - **Type safe**: Can only use valid `CellKey` from the primary `SlotMap`
/// - **Cache friendly**: Better locality than separate `HashMap<CellKey, V>`
/// - **`SlotMap` integration**: Designed specifically for this use case
///
/// # Use Cases
///
/// - **Phase 3 algorithms**: Conflict region finding, cavity extraction
/// - **Algorithm state**: Marking cells as "visited", "in conflict", "processed"
/// - **Temporary data**: Associating algorithm-specific data with cells
///
/// # Examples
///
/// ```rust
/// use delaunay::prelude::triangulation::*;
///
/// let vertices = vec![
/// vertex!([0.0, 0.0, 0.0]),
/// vertex!([1.0, 0.0, 0.0]),
/// vertex!([0.0, 1.0, 0.0]),
/// vertex!([0.0, 0.0, 1.0]),
/// ];
/// let dt: DelaunayTriangulation<_, _, _, 3> = DelaunayTriangulation::new(&vertices).unwrap();
/// let tds = dt.tds();
///
/// use delaunay::prelude::collections::CellSecondaryMap;
/// let mut in_conflict: CellSecondaryMap<bool> = CellSecondaryMap::new();
/// for (cell_key, _) in tds.cells() {
/// in_conflict.insert(cell_key, true);
/// }
/// ```
pub type CellSecondaryMap<V> = ;
/// Sparse secondary map for tracking auxiliary data associated with vertices.
///
/// This is the idiomatic way to associate temporary data with `SlotMap` keys during algorithms.
/// Only stores entries for vertices that have associated data (sparse representation).
///
/// # Performance Benefits
///
/// - **Memory efficient**: Only allocates for vertices with data (vs dense array)
/// - **Type safe**: Can only use valid `VertexKey` from the primary `SlotMap`
/// - **Cache friendly**: Better locality than separate `HashMap<VertexKey, V>`
/// - **`SlotMap` integration**: Designed specifically for this use case
///
/// # Use Cases
///
/// - **Algorithm state**: Marking vertices as "visited", "processed", "boundary"
/// - **Distance tracking**: Shortest path, geodesic distance computations
/// - **Temporary data**: Associating algorithm-specific data with vertices
///
/// # Examples
///
/// ```rust
/// use delaunay::prelude::triangulation::*;
///
/// let vertices = vec![
/// vertex!([0.0, 0.0, 0.0]),
/// vertex!([1.0, 0.0, 0.0]),
/// vertex!([0.0, 1.0, 0.0]),
/// vertex!([0.0, 0.0, 1.0]),
/// ];
/// let dt: DelaunayTriangulation<_, _, _, 3> = DelaunayTriangulation::new(&vertices).unwrap();
/// let tds = dt.tds();
///
/// use delaunay::prelude::collections::VertexSecondaryMap;
/// let mut processing_order: VertexSecondaryMap<usize> = VertexSecondaryMap::new();
/// for (idx, (vertex_key, _)) in tds.vertices().enumerate() {
/// processing_order.insert(vertex_key, idx);
/// }
/// ```
pub type VertexSecondaryMap<V> = ;