pub fn solve(grid: Grid, rules: Rules) -> Solution {
    assert_eq!(grid.size(), rules.size());
    let rules = Rc::new(rules);
    let partitioner = Partitioner::new(rules);
    let strategies = vec![Box::new(partitioner) as Box<Strategy>];
    let mut iter = SolutionsIter::new(grid, strategies);
    match (iter.next(), iter.next()) {
        (Some(grid), Some(_)) => Solution::NonUnique(grid),
        (Some(grid), None)    => Solution::Unique(grid),
        (None, _)             => Solution::Unsolvable,
    }
}
/// Solves a `Grid`
///
/// This is a simple wrapper for `SolutionsIter` that uses sane defaults.
Solves a `Grid`
This is a simple wrapper for `SolutionsIter` that uses sane defaults.
Solves a ` Grid ` This is a simple wrapper for ` SolutionsIter ` that uses sane defaults .
pub fn solve(grid: Grid, rules: Rules) -> Solution {
    assert_eq!(grid.size(), rules.size());
    let rules = Rc::new(rules);
    let partitioner = Partitioner::new(rules);
    let strategies = vec![Box::new(partitioner) as Box<Strategy>];
    let mut iter = SolutionsIter::new(grid, strategies);
    match (iter.next(), iter.next()) {
        (Some(grid), Some(_)) => Solution::NonUnique(grid),
        (Some(grid), None)    => Solution::Unique(grid),
        (None, _)             => Solution::Unsolvable,
    }
}
pub fn solve ( grid : Grid , rules : Rules ) -> Solution { assert_eq ! ( grid size ( ) rules size ( ) ) ; let rules = Rc :: new ( rules ) ; let partitioner = Partitioner :: new ( rules ) ; let strategies = vec ! [ Box new ( partitioner ) as Box Strategy ] ; let mut iter = SolutionsIter :: new ( grid , strategies ) ; match ( iter . next ( ) , iter . next ( ) ) { ( Some ( grid ) , Some ( _ ) ) => Solution :: NonUnique ( grid ) , ( Some ( grid ) , None ) => Solution :: Unique ( grid ) , ( None , _ ) => Solution :: Unsolvable , } }
Solves a `Grid`
This is a simple wrapper for `SolutionsIter` that uses sane defaults.
Solves a ` Grid ` This is a simple wrapper for ` SolutionsIter ` that uses sane defaults .
grid
Grid
rules
Rules
grid
Grid
rules
Rules