This function fetches ranges of expressions from the DAEG. The argument `assignments` associates indices of sought expressions with their ranges, which this function modifies to reflect the intervals in the DAEG.
(&self, assignments: &mut [(usize, Interval)])
| 546 | /// `assignments` associates indices of sought expressions with their ranges, |
| 547 | /// which this function modifies to reflect the intervals in the DAEG. |
| 548 | pub fn update_intervals(&self, assignments: &mut [(usize, Interval)]) { |
| 549 | for (index, interval) in assignments.iter_mut() { |
| 550 | let node_index = NodeIndex::from(*index as DefaultIx); |
| 551 | *interval = self.graph[node_index].interval.clone(); |
| 552 | } |
| 553 | } |
| 554 | |
| 555 | /// Computes bounds for an expression using interval arithmetic via a |
| 556 | /// bottom-up traversal. |