fn deduce(grid: &mut Grid, strategies: &mut [Box<Strategy>], mut vetoes: Vec<CaseId>) {
        while vetoes.len() > 0 {
            let mut inferences: Vec<CaseId> = vec![];
            for strategy in strategies.iter_mut() {
                debug_assert_eq!(strategy.inferences().len(), 0);
                // This is a minimal-copy way of collecting new inferences into `inferences`.
                mem::swap(&mut inferences, strategy.inferences());
                strategy.veto(&vetoes[..]);
                mem::swap(&mut inferences, strategy.inferences());
            }
            grid.veto(inferences.iter().cloned());
            vetoes = inferences;
        }
    }
// Incorporate vetos, taking as much as possible into account without guessing.
Incorporate vetos, taking as much as possible into account without guessing.
Incorporate vetos taking as much as possible into account without guessing .
fn deduce(grid: &mut Grid, strategies: &mut [Box<Strategy>], mut vetoes: Vec<CaseId>) {
        while vetoes.len() > 0 {
            let mut inferences: Vec<CaseId> = vec![];
            for strategy in strategies.iter_mut() {
                debug_assert_eq!(strategy.inferences().len(), 0);
                // This is a minimal-copy way of collecting new inferences into `inferences`.
                mem::swap(&mut inferences, strategy.inferences());
                strategy.veto(&vetoes[..]);
                mem::swap(&mut inferences, strategy.inferences());
            }
            grid.veto(inferences.iter().cloned());
            vetoes = inferences;
        }
    }
fn deduce ( grid : & mut Grid , strategies : & mut [ Box < Strategy > ] , mut vetoes : Vec < CaseId > ) { while vetoes . len ( ) > 0 { let mut inferences : Vec < CaseId > = vec ! [ ] ; for strategy in strategies . iter_mut ( ) { debug_assert_eq ! ( strategy inferences ( ) len ( ) 0 ) ; // This is a minimal-copy way of collecting new inferences into `inferences`. mem :: swap ( & mut inferences , strategy . inferences ( ) ) ; strategy . veto ( & vetoes [ .. ] ) ; mem :: swap ( & mut inferences , strategy . inferences ( ) ) ; } grid . veto ( inferences . iter ( ) . cloned ( ) ) ; vetoes = inferences ; } }
Incorporate vetos, taking as much as possible into account without guessing.
Incorporate vetos taking as much as possible into account without guessing .
grid
&mut Grid
strategies
&mut [Box<Strategy>]
vetoes
Vec<CaseId>
grid
&mut Grid
strategies
&mut [Box<Strategy>]
vetoes
Vec<CaseId>