Add edge return type to GraphTopology::add_edge()
There is currently no use for the return type, but it will come.
This commit is contained in:
+2
-1
@@ -1,5 +1,6 @@
|
||||
pub trait GraphTopology {
|
||||
type Vertex: Copy + Eq;
|
||||
type Edge;
|
||||
|
||||
fn vertex_count(&self) -> usize;
|
||||
fn edge_count(&self) -> usize;
|
||||
@@ -8,5 +9,5 @@ pub trait GraphTopology {
|
||||
fn vertices(&self) -> impl Iterator<Item = Self::Vertex>;
|
||||
fn neighbors(&self, v: Self::Vertex) -> impl Iterator<Item = Self::Vertex>;
|
||||
fn add_vertex(&mut self) -> Self::Vertex;
|
||||
fn add_edge(&mut self, v1: Self::Vertex, v2: Self::Vertex);
|
||||
fn add_edge(&mut self, v1: Self::Vertex, v2: Self::Vertex) -> Self::Edge;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user