Function
antichain_insert
(into: &mut Vec<Vec<usize>>, item: Vec<usize>)
Source from the content-addressed store, hash-verified
| 745 | } |
| 746 | |
| 747 | fn antichain_insert(into: &mut Vec<Vec<usize>>, item: Vec<usize>) { |
| 748 | // Insert only if there is not a dominating element of `into`. |
| 749 | if into.iter().all(|key| !key.iter().all(|k| item.contains(k))) { |
| 750 | into.retain(|key| !key.iter().all(|k| item.contains(k))); |
| 751 | into.push(item); |
| 752 | } |
| 753 | } |
| 754 | |
| 755 | /// Lattice for sets of columns that define a unique key. |
| 756 | /// |
Tested by
no test coverage detected