1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! Builders for some common types of XCC problems.
use crateMatrix;
/// Builds a matrix for the toy problem in equation (49)
/// of Knuth 7.2.2.1.
///
/// The problem has 3 primary items, `p`, `q`, and `r`, and 2 secondary items,
/// `x` and `y`. The options are:
/// - `p q x y:A`
/// - `p r x:A y`
/// - `p x:B`
/// - `q x:A`
/// - `r y:B`
///
/// # Example
///
/// ```
/// use xcc::samples::toy;
///
/// let mut matrix = toy();
/// let solutions = matrix.solve_all();
/// assert_eq!(solutions.len(), 1);
/// ```