@@ -21,28 +21,36 @@ mod tests;
2121pub  struct  Sccs < N :  Idx ,  S :  Idx >  { 
2222    /// For each node, what is the SCC index of the SCC to which it 
2323     /// belongs. 
24-      pub   scc_indices :  IndexVec < N ,  S > , 
24+      scc_indices :  IndexVec < N ,  S > , 
2525
2626    /// Data about each SCC. 
27-      pub   scc_data :  SccData < S > , 
27+      scc_data :  SccData < S > , 
2828} 
2929
3030pub  struct  SccData < S :  Idx >  { 
3131    /// For each SCC, the range of `all_successors` where its 
3232     /// successors can be found. 
33-      pub   ranges :  IndexVec < S ,  Range < usize > > , 
33+      ranges :  IndexVec < S ,  Range < usize > > , 
3434
3535    /// Contains the successors for all the Sccs, concatenated. The 
3636     /// range of indices corresponding to a given SCC is found in its 
3737     /// SccData. 
38-      pub   all_successors :  Vec < S > , 
38+      all_successors :  Vec < S > , 
3939} 
4040
4141impl < N :  Idx ,  S :  Idx  + Ord >  Sccs < N ,  S >  { 
4242    pub  fn  new ( graph :  & ( impl  DirectedGraph < Node  = N >  + WithNumNodes  + WithSuccessors ) )  -> Self  { 
4343        SccsConstruction :: construct ( graph) 
4444    } 
4545
46+     pub  fn  scc_indices ( & self )  -> & IndexVec < N ,  S >  { 
47+         & self . scc_indices 
48+     } 
49+ 
50+     pub  fn  scc_data ( & self )  -> & SccData < S >  { 
51+         & self . scc_data 
52+     } 
53+ 
4654    /// Returns the number of SCCs in the graph. 
4755     pub  fn  num_sccs ( & self )  -> usize  { 
4856        self . scc_data . len ( ) 
@@ -115,6 +123,14 @@ impl<S: Idx> SccData<S> {
115123        self . ranges . len ( ) 
116124    } 
117125
126+     pub  fn  ranges ( & self )  -> & IndexVec < S ,  Range < usize > >  { 
127+         & self . ranges 
128+     } 
129+ 
130+     pub  fn  all_successors ( & self )  -> & Vec < S >  { 
131+         & self . all_successors 
132+     } 
133+ 
118134    /// Returns the successors of the given SCC. 
119135     fn  successors ( & self ,  scc :  S )  -> & [ S ]  { 
120136        // Annoyingly, `range` does not implement `Copy`, so we have 
0 commit comments