Skip to main content

ChainTrellis

Struct ChainTrellis 

Source
pub struct ChainTrellis<'a, A: Arc> { /* private fields */ }
Expand description

AlignChain against a matrix of scores: the trellis align solves.

The chain alone has no scores, and a Trellis is the two together. This is public because the trellis is the reusable half: best_path and posteriors take one, so a caller wanting the raw Path, or a variant topology of their own, starts here rather than at align. It is also the worked example the trellis docs point at.

Implementations§

Source§

impl<A: Arc> ChainTrellis<'_, A>

Source

pub fn chain(&self) -> &AlignChain

The reference this reads.

Trait Implementations§

Source§

impl<'a, A: Clone + Arc> Clone for ChainTrellis<'a, A>

Source§

fn clone(&self) -> ChainTrellis<'a, A>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a, A: Copy + Arc> Copy for ChainTrellis<'a, A>

Source§

impl<'a, A: Debug + Arc> Debug for ChainTrellis<'a, A>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<A: Arc> ReversibleTrellis<4> for ChainTrellis<'_, A>
where A::Weight: FromScore,

Source§

fn steps_out_of(&self, frame: &[f32], position: usize) -> [Step; 4]

The DEGREE transitions leaving position, in the same order steps_into lists them. Read more
Source§

impl<A: Arc> Trellis<4> for ChainTrellis<'_, A>
where A::Weight: FromScore,

Source§

type Frame<'f> = &'f [f32] where Self: 'f

What one frame’s transitions are read from, usually a row of acoustic scores. Read more
Source§

fn num_frames(&self) -> usize

The number of frames to be accounted for.
Source§

fn num_positions(&self) -> usize

The last position. There are num_positions() + 1 cells in a frame, s_0 through s_N; a path starts at s_0 and has to finish at s_N.
Source§

fn frame(&self, frame: usize) -> &[f32]

One frame’s scores.
Source§

fn steps_into(&self, frame: &[f32], position: usize) -> [Step; 4]

The DEGREE transitions entering position, best-first. Read more
Source§

const REACH: u8 = 1

The most positions any one transition advances. One for a chain, where a frame either holds its position or moves to the next; more for a trellis that can pass over several positions at once, such as one that gives up a whole word. Read more

Auto Trait Implementations§

§

impl<'a, A> Freeze for ChainTrellis<'a, A>
where &'a DenseFst<'a, A>: Freeze,

§

impl<'a, A> RefUnwindSafe for ChainTrellis<'a, A>
where &'a DenseFst<'a, A>: RefUnwindSafe,

§

impl<'a, A> Send for ChainTrellis<'a, A>
where &'a DenseFst<'a, A>: Send,

§

impl<'a, A> Sync for ChainTrellis<'a, A>
where &'a DenseFst<'a, A>: Sync,

§

impl<'a, A> Unpin for ChainTrellis<'a, A>
where &'a DenseFst<'a, A>: Unpin,

§

impl<'a, A> UnsafeUnpin for ChainTrellis<'a, A>
where &'a DenseFst<'a, A>: UnsafeUnpin,

§

impl<'a, A> UnwindSafe for ChainTrellis<'a, A>
where &'a DenseFst<'a, A>: 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.