Trait rustfst::algorithms::factor_weight::FactorIterator [−][src]
pub trait FactorIterator<W: Semiring>: Debug + PartialEq + Clone + Iterator<Item = (W, W)> + Sync { fn new(weight: W) -> Self; fn done(&self) -> bool; }
Expand description
A factor iterator takes as argument a weight w and returns a sequence of pairs of weights (xi, yi) such that the sum of the products xi times yi is equal to w. If w is fully factored, the iterator should return nothing.