pub fn veto<I>(&mut self, vetoes: I)
        where I: Iterator<Item=CaseId> {
        let rules = &mut self.rules.clone();
        for veto in vetoes {
            if !self.grid[veto] {
                continue;
            }
            let (veto_cell, veto_value): (CellId, ValueId) = self.grid.convert(veto);
            let all_values: Vec<_> = self.grid.range_iter::<ValueId>().collect();
            for &clique_id in rules.cliques(veto_cell) {
                let cells = &rules[clique_id];
                self.remove_possibility(clique_id,
                                        (&all_values[..], cells),
                                        (veto_value, veto_cell));
                self.remove_possibility(clique_id,
                                        (cells, &all_values[..]),
                                        (veto_cell, veto_value));
            }
            self.grid[veto] = false;
        }
    }
/// Marks `CaseId`s as impossible.
///
/// This is used to inform the `Partitioner` of cell/value combinations that are known
/// to be impossible.
Marks `CaseId`s as impossible.
This is used to inform the `Partitioner` of cell/value combinations that are known
to be impossible.
Marks ` CaseId ` s as impossible . This is used to inform the ` Partitioner ` of cell / value combinations that are known to be impossible .
pub fn veto<I>(&mut self, vetoes: I)
        where I: Iterator<Item=CaseId> {
        let rules = &mut self.rules.clone();
        for veto in vetoes {
            if !self.grid[veto] {
                continue;
            }
            let (veto_cell, veto_value): (CellId, ValueId) = self.grid.convert(veto);
            let all_values: Vec<_> = self.grid.range_iter::<ValueId>().collect();
            for &clique_id in rules.cliques(veto_cell) {
                let cells = &rules[clique_id];
                self.remove_possibility(clique_id,
                                        (&all_values[..], cells),
                                        (veto_value, veto_cell));
                self.remove_possibility(clique_id,
                                        (cells, &all_values[..]),
                                        (veto_cell, veto_value));
            }
            self.grid[veto] = false;
        }
    }
pub fn veto < I > ( & mut self , vetoes : I ) where I : Iterator < Item = CaseId > { let rules = & mut self . rules . clone ( ) ; for veto in vetoes { if ! self . grid [ veto ] { continue ; } let ( veto_cell , veto_value ) : ( CellId , ValueId ) = self . grid . convert ( veto ) ; let all_values : Vec < _ > = self . grid . range_iter :: < ValueId > ( ) . collect ( ) ; for & clique_id in rules . cliques ( veto_cell ) { let cells = & rules [ clique_id ] ; self . remove_possibility ( clique_id , ( & all_values [ .. ] , cells ) , ( veto_value , veto_cell ) ) ; self . remove_possibility ( clique_id , ( cells , & all_values [ .. ] ) , ( veto_cell , veto_value ) ) ; } self . grid [ veto ] = false ; } }
Marks `CaseId`s as impossible.
Marks ` CaseId ` s as impossible .
&mut self
vetoes
I
&mut self
vetoes
I