Update generators::petersen to use graph reserve methods
This commit is contained in:
@@ -20,6 +20,8 @@ where
|
|||||||
const N: usize = 5;
|
const N: usize = 5;
|
||||||
const K: usize = 2;
|
const K: usize = 2;
|
||||||
|
|
||||||
|
graph.reserve_vertices(10);
|
||||||
|
graph.reserve_edges(15);
|
||||||
let vertices = core::array::from_fn(|_| graph.add_vertex());
|
let vertices = core::array::from_fn(|_| graph.add_vertex());
|
||||||
let edges = core::array::from_fn(|j| {
|
let edges = core::array::from_fn(|j| {
|
||||||
let i = j / 3;
|
let i = j / 3;
|
||||||
|
|||||||
Reference in New Issue
Block a user