Type additions and renames #3
+2
-2
@@ -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};
|
||||
|
||||
@@ -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
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user