#[non_exhaustive]pub enum SimplifyError {
DeadSumOut {
variables: Vec<VariableId>,
},
DeadIntegralOut {
variables: Vec<VariableId>,
},
}Expand description
Errors surfaced by the crate’s simplify entry points when they detect an ill-formed estimand instead of silently rewriting it.
eval_sum_out / eval_integral_out (crate::eval) evaluate SumOut /
IntegralOut as a literal, unnormalized sum/integral over
support(variables). A well-formed estimand always folds a P(v|·) factor into
the body for each bound variable v, so the body’s free variables always
intersect variables. If they don’t, the node is malformed: collapsing it to
its body (the old behavior) would silently divide the true value by
|support(v)| (SumOut) or drop the integration measure entirely
(IntegralOut). Rather than guess, simplify fails closed and reports it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
DeadSumOut
A SumOut binds variable(s) that are absent from the free variables of its
body.
Fields
variables: Vec<VariableId>The bound variables, none of which occur free in the summed body.
DeadIntegralOut
An IntegralOut binds variable(s) that are absent from the free variables of
its body.
Fields
variables: Vec<VariableId>The bound variables, none of which occur free in the integrated body.
Trait Implementations§
Source§impl Clone for SimplifyError
impl Clone for SimplifyError
Source§fn clone(&self) -> SimplifyError
fn clone(&self) -> SimplifyError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SimplifyError
impl Debug for SimplifyError
Source§impl Display for SimplifyError
impl Display for SimplifyError
impl Eq for SimplifyError
Source§impl Error for SimplifyError
impl Error for SimplifyError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()