exact_covers/
dc.rs

1use crate::indices::InstIndex;
2use crate::Solution;
3use std::ops::ControlFlow;
4
5/// Visits all solutions to a given XCC problem by means of dancing cells.
6///
7/// More precisely, this structure embodies an implementation of Algorithm C,
8/// as presented by D. E. Knuth in Section 7.2.2.3 of [_TAOCP_ **4C** (June 25, 2024)][taocp4c],
9/// Pre-Fascicle 7A (preliminary draft), pages 63–64.
10///
11/// [taocp4c]: https://cs.stanford.edu/~knuth/fasc7a.ps.gz
12pub struct Solver;
13
14impl<'i, I: Eq, C: Eq + Copy> crate::Solver<'i, I, C> for Solver {
15    fn new(primary: &'i [I], secondary: &'i [I]) -> Self {
16        todo!()
17    }
18
19    fn add_option<P, S>(&mut self, primary: P, secondary: S)
20    where
21        P: AsRef<[I]>,
22        S: AsRef<[(I, Option<C>)]>,
23    {
24        todo!()
25    }
26
27    fn solve<F>(self, visit: F)
28    where
29        F: FnMut(Solution<'_, 'i, I, C, Self>) -> ControlFlow<()>,
30    {
31        todo!()
32    }
33}
34
35impl<'i, I: Eq, C: Eq + Copy> crate::private::Solver<'i, I, C> for Solver {
36    fn pointer(&self, level: usize) -> Option<InstIndex> {
37        todo!()
38    }
39
40    fn level(&self) -> usize {
41        todo!()
42    }
43
44    fn option_of(&self, ix: InstIndex, result: &mut Vec<(&'i I, Option<C>)>) {
45        todo!()
46    }
47}