[][src]Trait rustfst::algorithms::compose::compose_filters::ComposeFilter

pub trait ComposeFilter<W: Semiring>: Debug + Clone {
    type M1: Matcher<W>;
    type M2: Matcher<W>;
    type FS: FilterState;
    fn start(&self) -> Self::FS;
fn set_state(
        &mut self,
        s1: StateId,
        s2: StateId,
        filter_state: &Self::FS
    ) -> Result<()>;
fn filter_tr(
        &mut self,
        arc1: &mut Tr<W>,
        arc2: &mut Tr<W>
    ) -> Result<Self::FS>;
fn filter_final(&self, w1: &mut W, w2: &mut W) -> Result<()>;
fn matcher1(&self) -> &Self::M1;
fn matcher2(&self) -> &Self::M2;
fn matcher1_shared(&self) -> &Arc<Self::M1>;
fn matcher2_shared(&self) -> &Arc<Self::M2>;
fn properties(&self, inprops: FstProperties) -> FstProperties; fn fst1(&self) -> &Arc<<Self::M1 as Matcher<W>>::F> { ... }
fn fst2(&self) -> &Arc<<Self::M2 as Matcher<W>>::F> { ... } }

Composition filters determine which matches are allowed to proceed. The filter's state is represented by the type ComposeFilter::FS.

Associated Types

type M1: Matcher<W>

type M2: Matcher<W>

type FS: FilterState

Loading content...

Required methods

fn start(&self) -> Self::FS

fn set_state(
    &mut self,
    s1: StateId,
    s2: StateId,
    filter_state: &Self::FS
) -> Result<()>

fn filter_tr(&mut self, arc1: &mut Tr<W>, arc2: &mut Tr<W>) -> Result<Self::FS>

fn filter_final(&self, w1: &mut W, w2: &mut W) -> Result<()>

fn matcher1(&self) -> &Self::M1

fn matcher2(&self) -> &Self::M2

fn matcher1_shared(&self) -> &Arc<Self::M1>

fn matcher2_shared(&self) -> &Arc<Self::M2>

fn properties(&self, inprops: FstProperties) -> FstProperties

Loading content...

Provided methods

fn fst1(&self) -> &Arc<<Self::M1 as Matcher<W>>::F>

fn fst2(&self) -> &Arc<<Self::M2 as Matcher<W>>::F>

Loading content...

Implementors

impl<W: Semiring + WeaklyDivisibleSemiring + WeightQuantize, CF: LookAheadComposeFilterTrait<W>, SMT: MatchTypeTrait> ComposeFilter<W> for PushWeightsComposeFilter<W, CF, SMT> where
    CF::M1: LookaheadMatcher<W>,
    CF::M2: LookaheadMatcher<W>, 
[src]

type M1 = CF::M1

type M2 = CF::M2

type FS = PairFilterState<CF::FS, WeightFilterState<W>>

impl<W: Semiring, CF: LookAheadComposeFilterTrait<W>, SMT: MatchTypeTrait> ComposeFilter<W> for LookAheadComposeFilter<W, CF, SMT> where
    CF::M1: LookaheadMatcher<W>,
    CF::M2: LookaheadMatcher<W>, 
[src]

type M1 = CF::M1

type M2 = CF::M2

type FS = CF::FS

impl<W: Semiring, CF: LookAheadComposeFilterTrait<W>, SMT: MatchTypeTrait> ComposeFilter<W> for PushLabelsComposeFilter<W, CF, SMT> where
    CF::M1: LookaheadMatcher<W>,
    CF::M2: LookaheadMatcher<W>, 
[src]

type M1 = MultiEpsMatcher<W, CF::M1>

type M2 = MultiEpsMatcher<W, CF::M2>

type FS = PairFilterState<CF::FS, IntegerFilterState>

impl<W: Semiring, F: ComposeFilter<W>> ComposeFilter<W> for MultiEpsFilter<F>[src]

type M1 = F::M1

type M2 = F::M2

type FS = F::FS

impl<W: Semiring, M1: Matcher<W>, M2: Matcher<W>> ComposeFilter<W> for AltSequenceComposeFilter<W, M1, M2>[src]

type M1 = M1

type M2 = M2

type FS = IntegerFilterState

impl<W: Semiring, M1: Matcher<W>, M2: Matcher<W>> ComposeFilter<W> for MatchComposeFilter<W, M1, M2>[src]

type M1 = M1

type M2 = M2

type FS = IntegerFilterState

impl<W: Semiring, M1: Matcher<W>, M2: Matcher<W>> ComposeFilter<W> for NoMatchComposeFilter<W, M1, M2>[src]

type M1 = M1

type M2 = M2

type FS = TrivialFilterState

impl<W: Semiring, M1: Matcher<W>, M2: Matcher<W>> ComposeFilter<W> for NullComposeFilter<W, M1, M2>[src]

type M1 = M1

type M2 = M2

type FS = TrivialFilterState

impl<W: Semiring, M1: Matcher<W>, M2: Matcher<W>> ComposeFilter<W> for SequenceComposeFilter<W, M1, M2>[src]

type M1 = M1

type M2 = M2

type FS = IntegerFilterState

impl<W: Semiring, M1: Matcher<W>, M2: Matcher<W>> ComposeFilter<W> for TrivialComposeFilter<W, M1, M2>[src]

type M1 = M1

type M2 = M2

type FS = TrivialFilterState

Loading content...