@@ -29,8 +29,6 @@ pub type CompressedCsrGraph = CsrGraph<EF, BitFieldVec>;
2929pub type CompressedCsrSortedGraph = CsrSortedGraph < EF , BitFieldVec > ;
3030
3131/// A compressed sparse-row graph.
32- #[ derive( Debug , Clone , Epserde ) ]
33- #[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
3432///
3533/// It is a graph representation that stores the degree cumulative function
3634/// (DCF) and the successors in a compressed format. The DCF is a sequence of
@@ -51,6 +49,8 @@ pub type CompressedCsrSortedGraph = CsrSortedGraph<EF, BitFieldVec>;
5149/// using a [`BitFieldVec`]. There is also a [version with sorted
5250/// successors](CompressedCsrSortedGraph). Their construction requires a
5351/// sequential graph providing the number of arcs.
52+ #[ derive( Debug , Clone , Epserde ) ]
53+ #[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
5454pub struct CsrGraph < DCF = Box < [ usize ] > , S = Box < [ usize ] > > {
5555 dcf : DCF ,
5656 successors : S ,
@@ -268,7 +268,7 @@ where
268268 DCF : SliceByValue + IterateByValueFrom < Item = usize > ,
269269 S : SliceByValue + IterateByValueFrom < Item = usize > ,
270270{
271- type Lender = LenderImpl < IterFrom < ' a , DCF > , IterFrom < ' a , S > > ;
271+ type Lender = NodeLabels < IterFrom < ' a , DCF > , IterFrom < ' a , S > > ;
272272
273273 #[ inline( always) ]
274274 fn into_lender ( self ) -> Self :: Lender {
@@ -299,7 +299,7 @@ where
299299{
300300 type Label = usize ;
301301 type Lender < ' a >
302- = LenderImpl < IterFrom < ' a , DCF > , IterFrom < ' a , S > >
302+ = NodeLabels < IterFrom < ' a , DCF > , IterFrom < ' a , S > >
303303 where
304304 Self : ' a ;
305305
@@ -320,7 +320,7 @@ where
320320 // because it might not exist
321321 let offset = offsets_iter. next ( ) . unwrap_or ( 0 ) ;
322322
323- LenderImpl {
323+ NodeLabels {
324324 node : from,
325325 last_offset : offset,
326326 current_offset : offset,
@@ -462,7 +462,7 @@ where
462462
463463/// Sequential Lender for the CSR graph.
464464#[ derive( Debug , Clone ) ]
465- pub struct LenderImpl < O : Iterator < Item = usize > , S : Iterator < Item = usize > > {
465+ pub struct NodeLabels < O : Iterator < Item = usize > , S : Iterator < Item = usize > > {
466466 /// The next node to lend labels for.
467467 node : usize ,
468468 /// This is the offset of the last successor of the previous node.
@@ -477,11 +477,11 @@ pub struct LenderImpl<O: Iterator<Item = usize>, S: Iterator<Item = usize>> {
477477}
478478
479479unsafe impl < O : Iterator < Item = usize > , S : Iterator < Item = usize > > SortedLender
480- for LenderImpl < O , S >
480+ for NodeLabels < O , S >
481481{
482482}
483483
484- impl < ' succ , I , D > NodeLabelsLender < ' succ > for LenderImpl < I , D >
484+ impl < ' succ , I , D > NodeLabelsLender < ' succ > for NodeLabels < I , D >
485485where
486486 I : Iterator < Item = usize > ,
487487 D : Iterator < Item = usize > ,
@@ -490,15 +490,15 @@ where
490490 type IntoIterator = SeqSucc < ' succ , D > ;
491491}
492492
493- impl < ' succ , I , D > Lending < ' succ > for LenderImpl < I , D >
493+ impl < ' succ , I , D > Lending < ' succ > for NodeLabels < I , D >
494494where
495495 I : Iterator < Item = usize > ,
496496 D : Iterator < Item = usize > ,
497497{
498498 type Lend = ( usize , SeqSucc < ' succ , D > ) ;
499499}
500500
501- impl < I , D > Lender for LenderImpl < I , D >
501+ impl < I , D > Lender for NodeLabels < I , D >
502502where
503503 I : Iterator < Item = usize > ,
504504 D : Iterator < Item = usize > ,
@@ -535,7 +535,7 @@ where
535535/// Sequential Lender for the CSR graph.
536536#[ derive( Debug , Clone ) ]
537537#[ repr( transparent) ]
538- pub struct LenderSortedImpl < O : Iterator < Item = usize > , S : Iterator < Item = usize > > ( LenderImpl < O , S > ) ;
538+ pub struct LenderSortedImpl < O : Iterator < Item = usize > , S : Iterator < Item = usize > > ( NodeLabels < O , S > ) ;
539539
540540unsafe impl < O : Iterator < Item = usize > , S : Iterator < Item = usize > > SortedLender
541541 for LenderSortedImpl < O , S >
0 commit comments