[−][src]Struct rustfst::FstPath
Structure representing a path in a FST (list of input labels, list of output labels and total weight).
Fields
ilabels: Vec<Label>
List of input labels.
olabels: Vec<Label>
List of output labels.
weight: W
Total weight of the path computed by multiplying the weight of each transition.
Implementations
impl<W: Semiring> FstPath<W>
[src]
pub fn new(ilabels: Vec<Label>, olabels: Vec<Label>, weight: W) -> Self
[src]
Creates a new Path.
pub fn add_to_path(
&mut self,
ilabel: Label,
olabel: Label,
weight: &W
) -> Result<()>
[src]
&mut self,
ilabel: Label,
olabel: Label,
weight: &W
) -> Result<()>
Adds the content of an FST transition to the Path. Labels are added at the end of the corresponding vectors and the weight is multiplied by the total weight already stored in the Path.
pub fn add_weight(&mut self, weight: &W) -> Result<()>
[src]
Add a single weight to the Path by multiplying the weight by the total weight of the path.
pub fn concat(&mut self, other: FstPath<W>) -> Result<()>
[src]
Append a Path to the current Path. Labels are appended and weights multiplied.
pub fn is_empty(&self) -> bool
[src]
Trait Implementations
impl<W: Clone + Semiring> Clone for FstPath<W>
[src]
impl<W: Debug + Semiring> Debug for FstPath<W>
[src]
impl<W: Semiring> Default for FstPath<W>
[src]
impl<W: Semiring + Hash + Eq> Eq for FstPath<W>
[src]
impl<W: Semiring + Hash + Eq> Hash for FstPath<W>
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<W: PartialEq + Semiring> PartialEq<FstPath<W>> for FstPath<W>
[src]
impl<W: PartialOrd + Semiring> PartialOrd<FstPath<W>> for FstPath<W>
[src]
fn partial_cmp(&self, other: &FstPath<W>) -> Option<Ordering>
[src]
fn lt(&self, other: &FstPath<W>) -> bool
[src]
fn le(&self, other: &FstPath<W>) -> bool
[src]
fn gt(&self, other: &FstPath<W>) -> bool
[src]
fn ge(&self, other: &FstPath<W>) -> bool
[src]
impl<W: Semiring> StructuralPartialEq for FstPath<W>
[src]
Auto Trait Implementations
impl<W> RefUnwindSafe for FstPath<W> where
W: RefUnwindSafe,
W: RefUnwindSafe,
impl<W> Send for FstPath<W> where
W: Send,
W: Send,
impl<W> Sync for FstPath<W>
impl<W> Unpin for FstPath<W> where
W: Unpin,
W: Unpin,
impl<W> UnwindSafe for FstPath<W> where
W: UnwindSafe,
W: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,