Public Member Functions

fst::ClosureFst< A > Class Template Reference

#include <fst/closure.h>

Inherits fst::RationalFst< A >.

Collaboration diagram for fst::ClosureFst< A >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ClosureFst (const Fst< Arc > &fst, ClosureType closure_type)
 ClosureFst (const Fst< Arc > &fst, const ClosureFstOptions &opts)
 ClosureFst (const ClosureFst< Arc > &fst, bool safe=false)
 See Fst<>::Copy() for doc.
ClosureFst< A > * Copy (bool safe=false) const override
 Gets a copy of this ClosureFst. See Fst<>::Copy() for further doc.

Detailed Description

template<class A>
class fst::ClosureFst< A >

Computes the concatenative closure. This version is a delayed FST. If an FST transduces string x to y with weight a, then its closure transduces x to y with weight a, xx to yy with weight Times(a, a), xxx to yyy with weight Times(Times(a, a), a), etc. If closure_type == CLOSURE_STAR, then the empty string is transduced to itself with weight Weight::One() as well.

Complexity:

Time: O(v) Space: O(v)

where v is the number of states visited. Constant time and space to visit an input state or arc is assumed and exclusive of caching.

Definition at line 86 of file closure.h.


Constructor & Destructor Documentation

template<class A>
fst::ClosureFst< A >::ClosureFst ( const Fst< Arc > &  fst,
ClosureType  closure_type 
) [inline]

Definition at line 90 of file closure.h.

template<class A>
fst::ClosureFst< A >::ClosureFst ( const Fst< Arc > &  fst,
const ClosureFstOptions opts 
) [inline]

Definition at line 94 of file closure.h.

template<class A>
fst::ClosureFst< A >::ClosureFst ( const ClosureFst< Arc > &  fst,
bool  safe = false 
) [inline]

See Fst<>::Copy() for doc.

Definition at line 100 of file closure.h.


Member Function Documentation

template<class A>
ClosureFst<A>* fst::ClosureFst< A >::Copy ( bool  safe = false  )  const [inline, override, virtual]

Gets a copy of this ClosureFst. See Fst<>::Copy() for further doc.

Implements fst::Fst< typename internal::RationalFstImpl< A >::Arc >.

Definition at line 104 of file closure.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines