Add new GraphTopologyDeletion trait for Graph to implement
This commit is contained in:
@@ -13,3 +13,8 @@ pub trait GraphTopology {
|
||||
fn add_vertex(&mut self) -> Self::Vertex;
|
||||
fn add_edge(&mut self, v1: Self::Vertex, v2: Self::Vertex) -> Self::Edge;
|
||||
}
|
||||
|
||||
pub trait GraphTopologyDeletion: GraphTopology {
|
||||
fn delete_vertex(&mut self, v: Self::Vertex);
|
||||
fn delete_edge(&mut self, e: Self::Edge);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user