Adds a new key for the relation.
(mut self, mut indices: Vec<usize>)
| 310 | |
| 311 | /// Adds a new key for the relation. |
| 312 | pub fn with_key(mut self, mut indices: Vec<usize>) -> Self { |
| 313 | indices.sort_unstable(); |
| 314 | if !self.keys.contains(&indices) { |
| 315 | self.keys.push(indices); |
| 316 | } |
| 317 | self |
| 318 | } |
| 319 | |
| 320 | pub fn with_keys(mut self, keys: Vec<Vec<usize>>) -> Self { |
| 321 | for key in keys { |