frankmcsherry / pagerank

Implementation of PageRank in timely dataflow
MIT License
73 stars 16 forks source link

The logic of Parser seems not be right to me? #12

Open gaoyunhaii opened 5 years ago

gaoyunhaii commented 5 years ago

The main logic of the the parser is

for each line {
       source = ...

        while cur_source < source {
            node_writer.write(&unsafe { mem::transmute::<_, [u8; 8]>(cur_offset) }).unwrap();
            cur_source += 1;
        }
}

For a sample file:

0 1
0 2
1 2
2 3

The resulted offset will be [2, 3, 4, 4], but it seems should be [0, 2, 3, 4] ?

frankmcsherry commented 5 years ago

On the road at the moment, but will investigate. The project is a bit old, so perhaps there is a lingering bug that should be fixed. The graph-map project is where the parse.rs and print.rs code I trust lives.

gaoyunhaii commented 5 years ago

OK, Got it. I will try graph-map first then. Thank you! :)