pub trait SubSetOps<ID = Hedge, Other: SubSetLike<ID> = Self>: SubSetLike<ID> {
Show 22 methods
// Required methods
fn intersect_with(&mut self, other: &Self);
fn union_with(&mut self, other: &Self);
fn union_with_iter(&mut self, other: impl Iterator<Item = ID>);
fn sym_diff_with(&mut self, other: &Self);
fn empty_intersection(&self, other: &Self) -> bool;
fn empty_union(&self, other: &Self) -> bool;
fn subtract_with(&mut self, other: &Self);
// Provided methods
fn all_pairwise_ops(
left: &mut AHashSet<Self>,
right: &[Self],
op: &impl Fn(&Self, &Self) -> Self,
) -> bool { ... }
fn all_pairwise_ops_filter_map(
left: &mut AHashSet<Self>,
right: &[Self],
op: &impl Fn(&Self, &Self) -> Self,
filter_map: &impl Fn(Self) -> Option<Self>,
) -> bool { ... }
fn all_pairwise_unions(left: &mut AHashSet<Self>, right: &[Self]) -> bool { ... }
fn all_pairwise_sym_diff(left: &mut AHashSet<Self>, right: &[Self]) -> bool { ... }
fn all_ops_iterative_filter_map(
set: &[Self],
op: &impl Fn(&Self, &Self) -> Self,
filter_map: &impl Fn(Self) -> Option<Self>,
) -> AHashSet<Self> { ... }
fn all_unions_iterative(set: &[Self]) -> AHashSet<Self> { ... }
fn all_sym_diff_iterative(set: &[Self]) -> AHashSet<Self> { ... }
fn all_op_powerset_filter_map(
set: &[Self],
op: impl Fn(&mut Self, &Self),
filter_map: &impl Fn(Self) -> Option<Self>,
) -> Result<AHashSet<Self>, TryFromIntError> { ... }
fn all_unions_powerset_filter_map(
set: &[Self],
filter_map: &impl Fn(Self) -> Option<Self>,
) -> Result<AHashSet<Self>, TryFromIntError> { ... }
fn all_sym_diff_powerset(
set: &[Self],
filter_map: &impl Fn(Self) -> Option<Self>,
) -> Result<AHashSet<Self>, TryFromIntError> { ... }
fn n_op(
n: usize,
set: &[Self],
op: &impl Fn(&Self, &Self) -> Self,
) -> AHashSet<Self> { ... }
fn intersection(&self, other: &Self) -> Self { ... }
fn union(&self, other: &Self) -> Self { ... }
fn sym_diff(&self, other: &Self) -> Self { ... }
fn subtract(&self, other: &Self) -> Self { ... }
}Expand description
Defines operations that can be performed between subgraphs or collections of subgraphs.
This trait provides utilities for common set-like operations such as unions,
intersections (implicitly via other methods like subtract), and symmetric differences,
often applied pairwise to collections of subgraphs or iteratively.
§Type Parameters
Other: The type of the other subgraph to perform operations with. Defaults toSelf.
Required Methods§
fn intersect_with(&mut self, other: &Self)
fn union_with(&mut self, other: &Self)
fn union_with_iter(&mut self, other: impl Iterator<Item = ID>)
fn sym_diff_with(&mut self, other: &Self)
fn empty_intersection(&self, other: &Self) -> bool
fn empty_union(&self, other: &Self) -> bool
fn subtract_with(&mut self, other: &Self)
Provided Methods§
Sourcefn all_pairwise_ops(
left: &mut AHashSet<Self>,
right: &[Self],
op: &impl Fn(&Self, &Self) -> Self,
) -> bool
fn all_pairwise_ops( left: &mut AHashSet<Self>, right: &[Self], op: &impl Fn(&Self, &Self) -> Self, ) -> bool
Applies a pairwise operation op between all elements of left (a mutable set)
and all elements of right (a slice), adding results to left.
Returns true if left was modified.
fn all_pairwise_ops_filter_map( left: &mut AHashSet<Self>, right: &[Self], op: &impl Fn(&Self, &Self) -> Self, filter_map: &impl Fn(Self) -> Option<Self>, ) -> bool
fn all_pairwise_unions(left: &mut AHashSet<Self>, right: &[Self]) -> bool
fn all_pairwise_sym_diff(left: &mut AHashSet<Self>, right: &[Self]) -> bool
fn all_ops_iterative_filter_map( set: &[Self], op: &impl Fn(&Self, &Self) -> Self, filter_map: &impl Fn(Self) -> Option<Self>, ) -> AHashSet<Self>
fn all_unions_iterative(set: &[Self]) -> AHashSet<Self>
fn all_sym_diff_iterative(set: &[Self]) -> AHashSet<Self>
fn all_op_powerset_filter_map( set: &[Self], op: impl Fn(&mut Self, &Self), filter_map: &impl Fn(Self) -> Option<Self>, ) -> Result<AHashSet<Self>, TryFromIntError>
fn all_unions_powerset_filter_map( set: &[Self], filter_map: &impl Fn(Self) -> Option<Self>, ) -> Result<AHashSet<Self>, TryFromIntError>
fn all_sym_diff_powerset( set: &[Self], filter_map: &impl Fn(Self) -> Option<Self>, ) -> Result<AHashSet<Self>, TryFromIntError>
fn n_op( n: usize, set: &[Self], op: &impl Fn(&Self, &Self) -> Self, ) -> AHashSet<Self>
fn intersection(&self, other: &Self) -> Self
fn union(&self, other: &Self) -> Self
fn sym_diff(&self, other: &Self) -> Self
fn subtract(&self, other: &Self) -> Self
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".