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
98
99
100
101
102
103
104
105
106
107
108
109
110
//! Sparse secondary-map aliases for data associated with slotmap keys.
//!
//! These aliases provide type-safe auxiliary storage keyed by simplices or vertices
//! without requiring dense side arrays.
use crate;
use SparseSecondaryMap;
// =============================================================================
// SLOTMAP SECONDARY MAPS FOR AUXILIARY DATA
// =============================================================================
/// Sparse secondary map for tracking auxiliary data associated with simplices.
///
/// This is the idiomatic way to associate temporary data with `SlotMap` keys during algorithms.
/// Only stores entries for simplices that have associated data (sparse representation).
///
/// # Performance Benefits
///
/// - **Memory efficient**: Only allocates for simplices with data (vs dense array)
/// - **Type safe**: Can only use valid `SimplexKey` from the primary `SlotMap`
/// - **Cache friendly**: Better locality than separate `HashMap<SimplexKey, V>`
/// - **`SlotMap` integration**: Designed specifically for this use case
///
/// # Use Cases
///
/// - **Phase 3 algorithms**: Conflict region finding, cavity extraction
/// - **Algorithm state**: Marking simplices as "visited", "in conflict", "processed"
/// - **Temporary data**: Associating algorithm-specific data with simplices
///
/// # Examples
///
/// ```rust
/// use delaunay::prelude::*;
///
/// # fn main() -> Result<(), DelaunayTriangulationConstructionError> {
/// 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> =
/// DelaunayTriangulationBuilder::new(&vertices).build::<()>()?;
/// let tds = dt.tds();
///
/// use delaunay::prelude::collections::SimplexSecondaryMap;
/// let mut in_conflict: SimplexSecondaryMap<bool> = SimplexSecondaryMap::new();
/// for (simplex_key, _) in tds.simplices() {
/// in_conflict.insert(simplex_key, true);
/// }
/// # Ok(())
/// # }
/// ```
pub type SimplexSecondaryMap<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::*;
///
/// # fn main() -> Result<(), DelaunayTriangulationConstructionError> {
/// 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> =
/// DelaunayTriangulationBuilder::new(&vertices).build::<()>()?;
/// 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);
/// }
/// # Ok(())
/// # }
/// ```
pub type VertexSecondaryMap<V> = ;