Use PriorityQueue for Dijkstra's, requires Hash for Vertex

This commit is contained in:
2026-08-06 09:44:28 +02:00
parent 53a6bed932
commit 110e6310aa
3 changed files with 28 additions and 36 deletions
+2 -2
View File
@@ -7,14 +7,14 @@ use crate::traits::{GraphTopology, IncidenceCursor};
///
/// Handles are stable for the lifetime of the graph. Obtain via graph methods like
/// [`AppendGraph::add_vertex`] and [`AppendGraph::vertices`].
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
#[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)]
pub struct Vertex(usize);
/// An opaque handle identifying an edge in an [`AppendGraph`].
///
/// Handles are stable for the lifetime of the graph. Obtain via graph methods like
/// [`AppendGraph::add_edge`] and [`AppendGraph::edges`].
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
#[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)]
pub struct Edge(usize);
/// An [`EntityMap`] for [`AppendGraph`] vertices.