Skip to main content

PartialBooleanSystem

Trait PartialBooleanSystem 

Source
pub trait PartialBooleanSystem: NumInputs + NumOutputs {
    type LiteralId: IdType;
    type TermId: IdType;

    // Required method
    fn evaluate_term_partial(
        &self,
        term: &Self::TermId,
        input_values: &[bool],
    ) -> Option<bool>;
}
Expand description

Generic ways to access and query a set of partially specified boolean formulas.

Required Associated Types§

Source

type LiteralId: IdType

An identifier for an input of the boolean formula.

Source

type TermId: IdType

An identifier of an intermediate value or output.

Required Methods§

Source

fn evaluate_term_partial( &self, term: &Self::TermId, input_values: &[bool], ) -> Option<bool>

Compute the value of the term. The values of all needed literals must be defined by the input_values function. Returns None if the value is not specified for the given inputs.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl PartialBooleanSystem for SmallTruthTable

Source§

impl<'a, N> PartialBooleanSystem for RecursiveSim<'a, N>
where N: Network<LogicValue = bool>, N::Signal: EdgeWithInversion + Ord,

Source§

impl<'a, T: PartialBooleanSystem> PartialBooleanSystem for OutputSelection<'a, T, T::TermId>

Source§

impl<F, const NUM_INPUTS: usize, const NUM_OUTPUTS: usize> PartialBooleanSystem for NativeBooleanFunction<F, NUM_INPUTS, NUM_OUTPUTS>
where F: Fn([bool; NUM_INPUTS]) -> [bool; NUM_OUTPUTS],

Source§

impl<F> PartialBooleanSystem for F
where F: Fn(bool, bool) -> bool,

Implement the boolean system for two-input boolean functions.

Source§

impl<Node> PartialBooleanSystem for LogicNetwork<Node>
where Node: NetworkNode<NodeId = NodeId>,

Source§

impl<const NUM_INPUTS: usize> PartialBooleanSystem for SmallStaticTruthTable<NUM_INPUTS>