|
| 1 | +use crate::EdgeId; |
1 | 2 | use crate::NodeId; |
2 | 3 | use crate::Position; |
3 | 4 | use crate::TreeSequence; |
@@ -75,13 +76,26 @@ pub type EdgeRemoval = EdgeDifference<Removal>; |
75 | 76 | /// Manages iteration over trees to obtain |
76 | 77 | /// edge differences. |
77 | 78 | pub struct EdgeDifferencesIterator<'ts> { |
78 | | - treeseq: &'ts TreeSequence, |
| 79 | + edge_left: &'ts [Position], |
| 80 | + edge_right: &'ts [Position], |
| 81 | + edge_parent: &'ts [NodeId], |
| 82 | + edge_child: &'ts [NodeId], |
| 83 | + insertion_order: &'ts [EdgeId], |
| 84 | + removal_orderr: &'ts [EdgeId], |
79 | 85 | left: f64, |
80 | 86 | } |
81 | 87 |
|
82 | 88 | impl<'ts> EdgeDifferencesIterator<'ts> { |
83 | 89 | pub(crate) fn new(treeseq: &'ts TreeSequence) -> Self { |
84 | | - Self{treeseq, left: 0.} |
| 90 | + Self { |
| 91 | + edge_left: treeseq.tables().edges().left_slice(), |
| 92 | + edge_right: treeseq.tables().edges().right_slice(), |
| 93 | + edge_parent: treeseq.tables().edges().parent_slice(), |
| 94 | + edge_child: treeseq.tables().edges().child_slice(), |
| 95 | + insertion_order: treeseq.edge_insertion_order(), |
| 96 | + removal_orderr: treeseq.edge_removal_order(), |
| 97 | + left: 0., |
| 98 | + } |
85 | 99 | } |
86 | 100 | } |
87 | 101 |
|
|
0 commit comments