pub enum Op {
Not,
Agg(Aggregator),
Eq,
Neq,
Compose {
outer: String,
inner: String,
},
Add,
Sub,
Mul,
Div,
Less,
LessOrEqual,
TruthTable {
rows: Vec<TruthTableEntry>,
fallback: Option<Box<Op>>,
},
}Expand description
Operator types supported by the environment.
Variants§
Not
Negation: mirrors around midpoint. not(x) = hi - (x - lo)
Agg(Aggregator)
Aggregator-based operator (for and/or).
Eq
Equality operator: checks assigned probability or structural equality.
Neq
Inequality: not(eq(…))
Compose
Composition: outer(inner(…))
Add
Arithmetic: +, -, *, / (decimal-precision)
Sub
Mul
Div
Less
Numeric comparisons: <, <=
LessOrEqual
TruthTable
Links-defined finite truth table (issue #97, Section 3 of
netkeep80’s punch-list). When invoked the evaluator looks up the
first row whose inputs match xs (±1e-12 tolerance) and returns
the row’s output. If no row matches, the call delegates to
fallback so partial tables overlay cleanly onto the host
default. rows carries values pre-resolved against
env.symbol_prob at activation time.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Op
impl RefUnwindSafe for Op
impl Send for Op
impl Sync for Op
impl Unpin for Op
impl UnsafeUnpin for Op
impl UnwindSafe for Op
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more