pub type SimplicialComplex = Complex<Simplex>;Expand description
A type alias for a simplicial complex.
Aliased Type§
pub struct SimplicialComplex {
pub attachment_lattice: Lattice<usize>,
pub elements: HashMap<usize, Simplex>,
pub next_id: usize,
}Fields§
§attachment_lattice: Lattice<usize>The attachment relationships between elements, represented as a lattice of element IDs.
This lattice encodes the face relation: if element a is a face of element b,
then attachment_lattice.leq(a.id(), b.id()) returns Some(true).
Using IDs rather than full elements provides:
- Memory efficiency: IDs are much smaller than full elements
- Performance: Integer comparisons are faster than element comparisons
- Flexibility: Lattice operations independent of element type
elements: HashMap<usize, Simplex>A map storing all elements in the complex, keyed by their assigned ID.
This provides:
- Fast lookup: O(1) access to elements by ID
- Rich operations: Access to full element data and methods
- Content queries: Iteration over elements by dimension, type, etc.
next_id: usizeThe counter for the next available unique element identifier.
This ensures that:
- Each element gets a unique ID when added
- IDs are assigned sequentially for predictable behavior
- The complex can manage arbitrary numbers of elements