GraphicalSeparation

Trait GraphicalSeparation 

Source
pub trait GraphicalSeparation {
    // Required methods
    fn is_separator_set(
        &self,
        x: &Set<usize>,
        y: &Set<usize>,
        z: &Set<usize>,
    ) -> bool;
    fn is_minimal_separator_set(
        &self,
        x: &Set<usize>,
        y: &Set<usize>,
        z: &Set<usize>,
        w: Option<&Set<usize>>,
        v: Option<&Set<usize>>,
    ) -> bool;
    fn find_minimal_separator_set(
        &self,
        x: &Set<usize>,
        y: &Set<usize>,
        w: Option<&Set<usize>>,
        v: Option<&Set<usize>>,
    ) -> Option<Set<usize>>;
}
Expand description

A trait for graphical separation.

Required Methods§

Source

fn is_separator_set( &self, x: &Set<usize>, y: &Set<usize>, z: &Set<usize>, ) -> bool

Checks if the Z is a separator set for X and Y.

§Arguments
  • x - A set of vertices representing set X.
  • y - A set of vertices representing set Y.
  • z - A set of vertices representing set Z.
§Panics
  • If any of the vertex in X, Y, or Z are out of bounds.
  • If X, Y or Z are not disjoint sets.
  • If X and Y are empty sets.
§Returns

true if X and Y are separated by Z, false otherwise.

Source

fn is_minimal_separator_set( &self, x: &Set<usize>, y: &Set<usize>, z: &Set<usize>, w: Option<&Set<usize>>, v: Option<&Set<usize>>, ) -> bool

Checks if the Z is a minimal separator set for X and Y.

§Arguments
  • x - A set of vertices representing set X.
  • y - A set of vertices representing set Y.
  • z - A set of vertices representing set Z.
  • w - An optional iterable collection of vertices representing set W.
  • v - An optional iterable collection of vertices representing set V.
§Panics
  • If any of the vertex in X, Y, Z, W or V are out of bounds.
  • If X, Y or Z are not disjoint sets.
  • If X and Y are empty sets.
  • If not W <= Z <= V.
§Returns

true if Z is a minimal separator set for X and Y, false otherwise.

Source

fn find_minimal_separator_set( &self, x: &Set<usize>, y: &Set<usize>, w: Option<&Set<usize>>, v: Option<&Set<usize>>, ) -> Option<Set<usize>>

Finds a minimal separator set for the vertex sets X and Y, if any.

§Arguments
  • x - A set of vertices representing set X.
  • y - A set of vertices representing set Y.
§Panics
  • If any of the vertex in X, Y, W or V are out of bounds.
  • If X and Y are not disjoint sets.
  • If X or Y are empty sets.
  • If not W <= V.
§Returns

Some(Set) containing the minimal separator set, or None if no separator set exists.

Implementors§