@@ -135,7 +135,7 @@ pub(crate) struct CheckGraphResults<V> {
135
135
/// Pairs of nodes that have a path connecting them.
136
136
pub ( crate ) connected : HashSet < ( V , V ) > ,
137
137
/// Pairs of nodes that don't have a path connecting them.
138
- pub ( crate ) disconnected : HashSet < ( V , V ) > ,
138
+ pub ( crate ) disconnected : Vec < ( V , V ) > ,
139
139
/// Edges that are redundant because a longer path exists.
140
140
pub ( crate ) transitive_edges : Vec < ( V , V ) > ,
141
141
/// Variant of the graph with no transitive edges.
@@ -151,7 +151,7 @@ impl<V: NodeTrait + Debug> Default for CheckGraphResults<V> {
151
151
Self {
152
152
reachable : FixedBitSet :: new ( ) ,
153
153
connected : HashSet :: new ( ) ,
154
- disconnected : HashSet :: new ( ) ,
154
+ disconnected : Vec :: new ( ) ,
155
155
transitive_edges : Vec :: new ( ) ,
156
156
transitive_reduction : DiGraphMap :: new ( ) ,
157
157
transitive_closure : DiGraphMap :: new ( ) ,
@@ -198,7 +198,7 @@ where
198
198
199
199
let mut reachable = FixedBitSet :: with_capacity ( n * n) ;
200
200
let mut connected = HashSet :: new ( ) ;
201
- let mut disconnected = HashSet :: new ( ) ;
201
+ let mut disconnected = Vec :: new ( ) ;
202
202
203
203
let mut transitive_edges = Vec :: new ( ) ;
204
204
let mut transitive_reduction = DiGraphMap :: < V , ( ) > :: new ( ) ;
@@ -255,7 +255,7 @@ where
255
255
if reachable[ index] {
256
256
connected. insert ( pair) ;
257
257
} else {
258
- disconnected. insert ( pair) ;
258
+ disconnected. push ( pair) ;
259
259
}
260
260
}
261
261
}
0 commit comments