BackdoorCriterion

Trait BackdoorCriterion 

Source
pub trait BackdoorCriterion {
    // Required methods
    fn is_backdoor_set(
        &self,
        x: &Set<usize>,
        y: &Set<usize>,
        z: &Set<usize>,
    ) -> bool;
    fn is_minimal_backdoor_set(
        &self,
        x: &Set<usize>,
        y: &Set<usize>,
        z: &Set<usize>,
        w: Option<&Set<usize>>,
        v: Option<&Set<usize>>,
    ) -> bool;
    fn find_minimal_backdoor_set(
        &self,
        x: &Set<usize>,
        y: &Set<usize>,
        w: Option<&Set<usize>>,
        v: Option<&Set<usize>>,
    ) -> Option<Set<usize>>;
}
Expand description

A trait for backdoor adjustment criterion.

Required Methods§

Source

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

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

§Arguments
  • x - A set vertices representing set X.
  • y - A set vertices representing set Y.
  • z - A set 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_backdoor_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 backdoor adjustment set for X and Y.

§Arguments
  • x - A set vertices representing set X.
  • y - A set vertices representing set Y.
  • z - A set 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 backdoor adjustment set for X and Y, false otherwise.

Source

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

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

§Arguments
  • x - A set vertices representing set X.
  • y - A set 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 backdoor adjustment set, or None if no backdoor adjustment set exists.

Implementors§