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§
Sourcefn is_backdoor_set(
&self,
x: &Set<usize>,
y: &Set<usize>,
z: &Set<usize>,
) -> bool
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 setX.y- A set vertices representing setY.z- A set vertices representing setZ.
§Panics
- If any of the vertex in
X,Y, orZare out of bounds. - If
X,YorZare not disjoint sets. - If
XandYare empty sets.
§Returns
true if X and Y are separated by Z, false otherwise.
Sourcefn is_minimal_backdoor_set(
&self,
x: &Set<usize>,
y: &Set<usize>,
z: &Set<usize>,
w: Option<&Set<usize>>,
v: Option<&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
Checks if the Z is a minimal backdoor adjustment set for X and Y.
§Arguments
x- A set vertices representing setX.y- A set vertices representing setY.z- A set vertices representing setZ.w- An optional iterable collection of vertices representing setW.v- An optional iterable collection of vertices representing setV.
§Panics
- If any of the vertex in
X,Y,Z,WorVare out of bounds. - If
X,YorZare not disjoint sets. - If
XandYare empty sets. - If not
W<=Z<=V.
§Returns
true if Z is a minimal backdoor adjustment set for X and Y, false otherwise.
Sourcefn find_minimal_backdoor_set(
&self,
x: &Set<usize>,
y: &Set<usize>,
w: Option<&Set<usize>>,
v: Option<&Set<usize>>,
) -> Option<Set<usize>>
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 setX.y- A set vertices representing setY.
§Panics
- If any of the vertex in
X,Y,WorVare out of bounds. - If
XandYare not disjoint sets. - If
XorYare empty sets. - If not
W<=V.
§Returns
Some(Set) containing the minimal backdoor adjustment set,
or None if no backdoor adjustment set exists.