fn add_correlation_info(&mut self, model: &Model, b: &QueryBox) {
        let correlation_info: BTreeMap<QuantifierId, Vec<QuantifierId>> = b
            .correlation_info(model)
            .into_iter()
            .map(|(id, column_refs)| {
                (
                    id,
                    column_refs
                        .iter()
                        .map(|c| c.quantifier_id)
                        .sorted()
                        .unique()
                        .collect::<Vec<_>>(),
                )
            })
            .collect();

        for (correlated_q, quantifiers) in correlation_info.iter() {
            for q in quantifiers.iter() {
                self.new_line(&format!(
                    "Q{0} -> Q{1} [ {2}, style = filled, color = red ]",
                    correlated_q,
                    q,
                    DotLabel::SingleRow("correlation")
                ));
            }
        }
    }
/// Adds red arrows from correlated quantifiers to the sibling quantifiers they
/// are correlated with.
Adds red arrows from correlated quantifiers to the sibling quantifiers they
are correlated with.
Adds red arrows from correlated quantifiers to the sibling quantifiers they are correlated with .
fn add_correlation_info(&mut self, model: &Model, b: &QueryBox) {
        let correlation_info: BTreeMap<QuantifierId, Vec<QuantifierId>> = b
            .correlation_info(model)
            .into_iter()
            .map(|(id, column_refs)| {
                (
                    id,
                    column_refs
                        .iter()
                        .map(|c| c.quantifier_id)
                        .sorted()
                        .unique()
                        .collect::<Vec<_>>(),
                )
            })
            .collect();
        for (correlated_q, quantifiers) in correlation_info.iter() {
            for q in quantifiers.iter() {
                self.new_line(&format!(
                    "Q{0} -> Q{1} [ {2}, style = filled, color = red ]",
                    correlated_q,
                    q,
                    DotLabel::SingleRow("correlation")
                ));
            }
        }
    }
fn add_correlation_info ( & mut self , model : & Model , b : & QueryBox ) { let correlation_info : BTreeMap < QuantifierId , Vec < QuantifierId > > = b . correlation_info ( model ) . into_iter ( ) . map ( | ( id , column_refs ) | { ( id , column_refs . iter ( ) . map ( | c | c . quantifier_id ) . sorted ( ) . unique ( ) . collect :: < Vec < _ > > ( ) , ) } ) . collect ( ) ; for ( correlated_q , quantifiers ) in correlation_info . iter ( ) { for q in quantifiers . iter ( ) { self . new_line ( & format ! ( " " correlated_q q DotLabel SingleRow ( " " ) ) ) ; } } }
Adds red arrows from correlated quantifiers to the sibling quantifiers they
are correlated with.
Adds red arrows from correlated quantifiers to the sibling quantifiers they are correlated with .
&mut self
model
&Model
b
&QueryBox
&mut self
model
&Model
b
&QueryBox