Useful graph presets

This commit is contained in:
elvis
2025-07-07 01:25:38 +02:00
parent ad1ef6f6a6
commit cdf3d23243
3 changed files with 329 additions and 5 deletions

View File

@ -67,6 +67,7 @@ impl RSset {
}
}
/// returns the new set a \cap b
pub fn intersection(&self, b: &RSset) -> RSset {
// TODO maybe find more efficient way without copy/clone
let res: BTreeSet<_> = b
@ -77,6 +78,7 @@ impl RSset {
RSset { identifiers: res }
}
/// returns the new set a - b
pub fn subtraction(&self, b: &RSset) -> RSset {
// TODO maybe find more efficient way without copy/clone
let res: BTreeSet<_> = self