ebi 0.3.12

A stochastic process mining utility and library
Documentation
use crate::semantics::semantics::Semantics;
use ebi_objects::{
    anyhow::Result, ebi_arithmetic::Fraction, ebi_objects::labelled_petri_net::TransitionIndex,
};

pub trait StochasticSemantics:
    Semantics<SemState = <Self as StochasticSemantics>::StoSemState>
{
    type StoSemState;

    /**
     *
     * @param transition
     * @return the weight of the transition. This might depend on the state.
     */
    fn get_transition_weight(
        &self,
        state: &<Self as StochasticSemantics>::StoSemState,
        transition: TransitionIndex,
    ) -> Result<&Fraction>;

    /**
     *
     * @param enabledTransitions
     * @return the sum of the weight of the enabled transitions
     */
    fn get_total_weight_of_enabled_transitions(
        &self,
        state: &<Self as StochasticSemantics>::StoSemState,
    ) -> Result<Fraction>;
}