pnets_shrunk::reducers

Struct ChainReducer

Source
pub struct ChainReducer<Net, First, Second>(/* private fields */)
where
    First: Reduce<Net>,
    Second: Reduce<Net>;
Expand description

Apply the first reduction and then the second reduction

This struct also implement PlaceReduce and TransitionReduce to allows chaining reductions on a specific place or transition

Trait Implementations§

Source§

impl<Net: Default, First, Second> Default for ChainReducer<Net, First, Second>
where First: Reduce<Net> + Default, Second: Reduce<Net> + Default,

Source§

fn default() -> ChainReducer<Net, First, Second>

Returns the “default value” for a type. Read more
Source§

impl<Net, First, Second> PlaceReduce<Net> for ChainReducer<Net, First, Second>
where First: PlaceReduce<Net>, Second: PlaceReduce<Net>,

Source§

fn place_reduce( net: &mut Net, pl: PlaceId, modifications: &mut Vec<Modification>, )

Try to apply a reduction rule on a specific place
Source§

impl<Net, First, Second> Reduce<Net> for ChainReducer<Net, First, Second>
where First: Reduce<Net>, Second: Reduce<Net>,

Source§

fn reduce(net: &mut Net, modifications: &mut Vec<Modification>)

Compute a reduction rule on the network Read more
Source§

impl<Net, First, Second> TransitionReduce<Net> for ChainReducer<Net, First, Second>
where First: TransitionReduce<Net>, Second: TransitionReduce<Net>,

Source§

fn transition_reduce( net: &mut Net, tr: TransitionId, modifications: &mut Vec<Modification>, )

Try to apply a reduction rule on a specific place
Source§

impl<Net, First, Second> ConservativeReduce<Net> for ChainReducer<Net, First, Second>
where First: ConservativeReduce<Net>, Second: ConservativeReduce<Net>,

Auto Trait Implementations§

§

impl<Net, First, Second> Freeze for ChainReducer<Net, First, Second>

§

impl<Net, First, Second> RefUnwindSafe for ChainReducer<Net, First, Second>
where First: RefUnwindSafe, Second: RefUnwindSafe, Net: RefUnwindSafe,

§

impl<Net, First, Second> Send for ChainReducer<Net, First, Second>
where First: Send, Second: Send, Net: Send,

§

impl<Net, First, Second> Sync for ChainReducer<Net, First, Second>
where First: Sync, Second: Sync, Net: Sync,

§

impl<Net, First, Second> Unpin for ChainReducer<Net, First, Second>
where First: Unpin, Second: Unpin, Net: Unpin,

§

impl<Net, First, Second> UnwindSafe for ChainReducer<Net, First, Second>
where First: UnwindSafe, Second: UnwindSafe, Net: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.