@@ -5,7 +5,7 @@ use timely::dataflow::*;
55use timely:: dataflow:: operators:: probe:: Handle ;
66
77use differential_dataflow:: input:: Input ;
8- use differential_dataflow:: Collection ;
8+ use differential_dataflow:: VecCollection ;
99use differential_dataflow:: operators:: * ;
1010
1111use differential_dataflow:: lattice:: Lattice ;
@@ -115,18 +115,18 @@ fn main() {
115115/// The computation to determine this, and to maintain it as times change, is an iterative
116116/// computation that propagates times and maintains the minimal elements at each location.
117117fn frontier < G , T > (
118- nodes : Collection < G , ( Target , Source , T :: Summary ) > ,
119- edges : Collection < G , ( Source , Target ) > ,
120- times : Collection < G , ( Location , T ) > ,
121- ) -> Collection < G , ( Location , T ) >
118+ nodes : VecCollection < G , ( Target , Source , T :: Summary ) > ,
119+ edges : VecCollection < G , ( Source , Target ) > ,
120+ times : VecCollection < G , ( Location , T ) > ,
121+ ) -> VecCollection < G , ( Location , T ) >
122122where
123123 G : Scope < Timestamp : Lattice +Ord > ,
124124 T : Timestamp < Summary : differential_dataflow:: ExchangeData > ,
125125{
126126 // Translate node and edge transitions into a common Location to Location edge with an associated Summary.
127127 let nodes = nodes. map ( |( target, source, summary) | ( Location :: from ( target) , ( Location :: from ( source) , summary) ) ) ;
128128 let edges = edges. map ( |( source, target) | ( Location :: from ( source) , ( Location :: from ( target) , Default :: default ( ) ) ) ) ;
129- let transitions: Collection < G , ( Location , ( Location , T :: Summary ) ) > = nodes. concat ( & edges) ;
129+ let transitions: VecCollection < G , ( Location , ( Location , T :: Summary ) ) > = nodes. concat ( & edges) ;
130130
131131 times
132132 . iterate ( |reach| {
@@ -149,9 +149,9 @@ where
149149
150150/// Summary paths from locations to operator zero inputs.
151151fn summarize < G , T > (
152- nodes : Collection < G , ( Target , Source , T :: Summary ) > ,
153- edges : Collection < G , ( Source , Target ) > ,
154- ) -> Collection < G , ( Location , ( Location , T :: Summary ) ) >
152+ nodes : VecCollection < G , ( Target , Source , T :: Summary ) > ,
153+ edges : VecCollection < G , ( Source , Target ) > ,
154+ ) -> VecCollection < G , ( Location , ( Location , T :: Summary ) ) >
155155where
156156 G : Scope < Timestamp : Lattice +Ord > ,
157157 T : Timestamp < Summary : differential_dataflow:: ExchangeData +std:: hash:: Hash > ,
@@ -166,7 +166,7 @@ where
166166 // Retain node connections along "default" timestamp summaries.
167167 let nodes = nodes. map ( |( target, source, summary) | ( Location :: from ( source) , ( Location :: from ( target) , summary) ) ) ;
168168 let edges = edges. map ( |( source, target) | ( Location :: from ( target) , ( Location :: from ( source) , Default :: default ( ) ) ) ) ;
169- let transitions: Collection < G , ( Location , ( Location , T :: Summary ) ) > = nodes. concat ( & edges) ;
169+ let transitions: VecCollection < G , ( Location , ( Location , T :: Summary ) ) > = nodes. concat ( & edges) ;
170170
171171 zero_inputs
172172 . iterate ( |summaries| {
@@ -192,9 +192,9 @@ where
192192
193193/// Identifies cycles along paths that do not increment timestamps.
194194fn find_cycles < G : Scope , T : Timestamp > (
195- nodes : Collection < G , ( Target , Source , T :: Summary ) > ,
196- edges : Collection < G , ( Source , Target ) > ,
197- ) -> Collection < G , ( Location , Location ) >
195+ nodes : VecCollection < G , ( Target , Source , T :: Summary ) > ,
196+ edges : VecCollection < G , ( Source , Target ) > ,
197+ ) -> VecCollection < G , ( Location , Location ) >
198198where
199199 G : Scope < Timestamp : Lattice +Ord > ,
200200 T : Timestamp < Summary : differential_dataflow:: ExchangeData > ,
@@ -209,7 +209,7 @@ where
209209 }
210210 } ) ;
211211 let edges = edges. map ( |( source, target) | ( Location :: from ( source) , Location :: from ( target) ) ) ;
212- let transitions: Collection < G , ( Location , Location ) > = nodes. concat ( & edges) ;
212+ let transitions: VecCollection < G , ( Location , Location ) > = nodes. concat ( & edges) ;
213213
214214 // Repeatedly restrict to locations with an incoming path.
215215 transitions
@@ -223,4 +223,4 @@ where
223223 . semijoin ( & active)
224224 } )
225225 . consolidate ( )
226- }
226+ }
0 commit comments