exact-cover 0.1.1

(WIP) Asynchronous exact cover solver library using Knuth's dancing links algorithm
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Basic low-level callback objects to pass to the DLX algorithm.

use crate::dlx::{Matrix, Callback};

#[derive(Default)]
pub struct SolutionCallback {
    pub solutions: Vec<Vec<usize>>,
}

impl Callback for SolutionCallback {
    fn on_solution(&mut self, sol: Vec<usize>, _mat: &mut Matrix) {
        self.solutions.push(sol);
    }
}