Trait fera_graph::builder::Builder
source · pub trait Builder {
type Graph: WithEdge;
fn new(n: usize, m: usize) -> Self;
fn add_edge(&mut self, u: usize, v: usize);
fn finalize(self) -> Self::Graph;
}
Expand description
A builder used to build graphs.
See the module documentation for examples.
Required Associated Types
Required Methods
sourcefn new(n: usize, m: usize) -> Self
fn new(n: usize, m: usize) -> Self
Creates a new builder for a graph with exactly n
vertices and initial capacity for m
edges.
This method is generally called through WithBuilder::builder
, for example,
StaticGraph::builder(10, 26)
.