We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a119f67 commit 37f0522Copy full SHA for 37f0522
src/graph/minimum_spanning_tree.rs
@@ -16,7 +16,7 @@ pub struct Edge {
16
17
impl Edge {
18
/// Creates a new edge with the specified source, destination, and cost.
19
- fn new(source: usize, destination: usize, cost: usize) -> Self {
+ pub fn new(source: usize, destination: usize, cost: usize) -> Self {
20
Self {
21
source,
22
destination,
@@ -150,9 +150,7 @@ mod tests {
150
vec![
151
Edge::new(0, 1, 4),
152
Edge::new(0, 2, 6),
153
- // Component 1 (vertices 0, 1, 2)
154
Edge::new(3, 4, 2),
155
- // Component 2 (vertices 3, 4)
156
],
157
5,
158
None
0 commit comments