Add GraphTopologyAddition trait from GraphTopology
Move capacity and add methods from GraphTopology trait to new GraphTopologyAddition trait
This commit is contained in:
+2
-2
@@ -1,4 +1,4 @@
|
||||
use crate::traits::GraphTopology;
|
||||
use crate::traits::{GraphTopology, GraphTopologyAddition};
|
||||
|
||||
pub fn petersen<G>(
|
||||
graph: &mut G,
|
||||
@@ -7,7 +7,7 @@ pub fn petersen<G>(
|
||||
[<G as GraphTopology>::Edge; 15],
|
||||
)
|
||||
where
|
||||
G: GraphTopology,
|
||||
G: GraphTopologyAddition,
|
||||
{
|
||||
const N: usize = 5;
|
||||
const K: usize = 2;
|
||||
|
||||
Reference in New Issue
Block a user