Type additions and renames #3

Merged
warrence merged 7 commits from dev into main 2026-07-06 19:13:13 +02:00
3 changed files with 8 additions and 3 deletions
Showing only changes of commit 1446103d34 - Show all commits
+2 -2
View File
@@ -1,5 +1,5 @@
pub mod append_graph;
pub mod graph;
pub use append_graph::AppendGraph;
pub use graph::Graph;
pub use append_graph::{AppendGraph, AppendGraphEdgeMap, AppendGraphVertexMap};
pub use graph::{Graph, GraphEdgeMap, GraphVertexMap};
+3
View File
@@ -7,6 +7,9 @@ pub struct Vertex(usize);
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
pub struct Edge(usize);
pub type AppendGraphVertexMap<T> = VertexMap<Vertex, T>;
pub type AppendGraphEdgeMap<T> = EdgeMap<Edge, T>;
impl Edge {
fn normalize(&self) -> Self {
Self(self.0 & !1)
+3 -1
View File
@@ -4,9 +4,11 @@ use crate::maps::{EdgeMap, VertexMap};
use crate::traits::{GraphTopology, GraphTopologyDeletion, IncidenceCursor};
pub type Vertex = Index<VertexIncidenceHeader, usize, usize>;
pub type Edge = Index<IncidenceEntry, usize, usize>;
pub type GraphVertexMap<T> = VertexMap<Vertex, T>;
pub type GraphEdgeMap<T> = EdgeMap<Edge, T>;
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
struct VertexSlot(usize);