[][src]Struct rustfst::fst_properties::FstProperties

pub struct FstProperties { /* fields omitted */ }

The property bits here assert facts about an FST. If individual bits are added, then the composite fst_properties below, the property functions and property names in fst_properties.cc, and TestProperties() in test-fst_properties.h should be updated. For each of these fst_properties below there is a pair of property bits, one positive and one negative. If the positive bit is set, the property is true. If the negative bit is set, the property is false. If neither is set, the property has unknown value. Both should never be simultaneously set. The individual positive and negative bit pairs should be adjacent with the positive bit at an odd and lower position.

Implementations

impl FstProperties[src]

pub const ACCEPTOR: FstProperties[src]

ilabel == olabel for each transition.

pub const NOT_ACCEPTOR: FstProperties[src]

ilabel != olabel for some transition.

pub const I_DETERMINISTIC: FstProperties[src]

ilabels unique leaving each state.

pub const NOT_I_DETERMINISTIC: FstProperties[src]

ilabels not unique leaving some state.

pub const O_DETERMINISTIC: FstProperties[src]

olabels unique leaving each state.

pub const NOT_O_DETERMINISTIC: FstProperties[src]

olabels not unique leaving some state.

pub const EPSILONS: FstProperties[src]

FST has input/output epsilons.

pub const NO_EPSILONS: FstProperties[src]

FST has no input/output epsilons.

pub const I_EPSILONS: FstProperties[src]

FST has input epsilons.

pub const NO_I_EPSILONS: FstProperties[src]

FST has no input epsilons.

pub const O_EPSILONS: FstProperties[src]

FST has output epsilons.

pub const NO_O_EPSILONS: FstProperties[src]

FST has no output epsilons.

pub const I_LABEL_SORTED: FstProperties[src]

ilabels sorted wrt < for each state.

pub const NOT_I_LABEL_SORTED: FstProperties[src]

ilabels not sorted wrt < for some state.

pub const O_LABEL_SORTED: FstProperties[src]

olabels sorted wrt < for each state.

pub const NOT_O_LABEL_SORTED: FstProperties[src]

olabels not sorted wrt < for some state.

pub const WEIGHTED: FstProperties[src]

Non-trivial transition or final weights.

pub const UNWEIGHTED: FstProperties[src]

Only trivial transition and final weights.

pub const CYCLIC: FstProperties[src]

FST has cycles.

pub const ACYCLIC: FstProperties[src]

FST has no cycles.

pub const INITIAL_CYCLIC: FstProperties[src]

FST has cycles containing the initial state.

pub const INITIAL_ACYCLIC: FstProperties[src]

FST has no cycles containing the initial state.

pub const TOP_SORTED: FstProperties[src]

FST is topologically sorted.

pub const NOT_TOP_SORTED: FstProperties[src]

FST is not topologically sorted.

pub const ACCESSIBLE: FstProperties[src]

All states reachable from the initial state.

pub const NOT_ACCESSIBLE: FstProperties[src]

Not all states reachable from the initial state.

pub const COACCESSIBLE: FstProperties[src]

All states can reach a final state.

pub const NOT_COACCESSIBLE: FstProperties[src]

Not all states can reach a final state.

pub const STRING: FstProperties[src]

If NumStates() > 0, then state 0 is initial, state NumStates() - 1 is final, there is a transition from each non-final state i to state i + 1, and there are no other transitions.

pub const NOT_STRING: FstProperties[src]

Not a string FST.

pub const WEIGHTED_CYCLES: FstProperties[src]

FST has at least one weighted cycle.

pub const UNWEIGHTED_CYCLES: FstProperties[src]

Only unweighted cycles.

pub const fn empty() -> FstProperties[src]

Returns an empty set of flags

pub const fn all() -> FstProperties[src]

Returns the set containing all flags.

pub const fn bits(&self) -> u64[src]

Returns the raw value of the flags currently stored.

pub fn from_bits(bits: u64) -> Option<FstProperties>[src]

Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.

pub const fn from_bits_truncate(bits: u64) -> FstProperties[src]

Convert from underlying bit representation, dropping any bits that do not correspond to flags.

pub const unsafe fn from_bits_unchecked(bits: u64) -> FstProperties[src]

Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).

pub const fn is_empty(&self) -> bool[src]

Returns true if no flags are currently stored.

pub const fn is_all(&self) -> bool[src]

Returns true if all flags are currently set.

pub const fn intersects(&self, other: FstProperties) -> bool[src]

Returns true if there are flags common to both self and other.

pub const fn contains(&self, other: FstProperties) -> bool[src]

Returns true all of the flags in other are contained within self.

pub fn insert(&mut self, other: FstProperties)[src]

Inserts the specified flags in-place.

pub fn remove(&mut self, other: FstProperties)[src]

Removes the specified flags in-place.

pub fn toggle(&mut self, other: FstProperties)[src]

Toggles the specified flags in-place.

pub fn set(&mut self, other: FstProperties, value: bool)[src]

Inserts or removes the specified flags depending on the passed value.

impl FstProperties[src]

pub fn knows(&self, props: FstProperties) -> bool[src]

Check that all the props passed as parameter are known.

Trait Implementations

impl Binary for FstProperties[src]

impl BitAnd<FstProperties> for FstProperties[src]

type Output = FstProperties

The resulting type after applying the & operator.

fn bitand(self, other: FstProperties) -> FstProperties[src]

Returns the intersection between the two sets of flags.

impl BitAndAssign<FstProperties> for FstProperties[src]

fn bitand_assign(&mut self, other: FstProperties)[src]

Disables all flags disabled in the set.

impl BitOr<FstProperties> for FstProperties[src]

type Output = FstProperties

The resulting type after applying the | operator.

fn bitor(self, other: FstProperties) -> FstProperties[src]

Returns the union of the two sets of flags.

impl BitOrAssign<FstProperties> for FstProperties[src]

fn bitor_assign(&mut self, other: FstProperties)[src]

Adds the set of flags.

impl BitXor<FstProperties> for FstProperties[src]

type Output = FstProperties

The resulting type after applying the ^ operator.

fn bitxor(self, other: FstProperties) -> FstProperties[src]

Returns the left flags, but with all the right flags toggled.

impl BitXorAssign<FstProperties> for FstProperties[src]

fn bitxor_assign(&mut self, other: FstProperties)[src]

Toggles the set of flags.

impl Clone for FstProperties[src]

impl Copy for FstProperties[src]

impl Debug for FstProperties[src]

impl Eq for FstProperties[src]

impl Extend<FstProperties> for FstProperties[src]

impl FromIterator<FstProperties> for FstProperties[src]

impl Hash for FstProperties[src]

impl LowerHex for FstProperties[src]

impl Not for FstProperties[src]

type Output = FstProperties

The resulting type after applying the ! operator.

fn not(self) -> FstProperties[src]

Returns the complement of this set of flags.

impl Octal for FstProperties[src]

impl Ord for FstProperties[src]

impl PartialEq<FstProperties> for FstProperties[src]

impl PartialOrd<FstProperties> for FstProperties[src]

impl Shl<usize> for FstProperties[src]

type Output = FstProperties

The resulting type after applying the << operator.

impl Shr<usize> for FstProperties[src]

type Output = FstProperties

The resulting type after applying the >> operator.

impl StructuralEq for FstProperties[src]

impl StructuralPartialEq for FstProperties[src]

impl Sub<FstProperties> for FstProperties[src]

type Output = FstProperties

The resulting type after applying the - operator.

fn sub(self, other: FstProperties) -> FstProperties[src]

Returns the set difference of the two sets of flags.

impl SubAssign<FstProperties> for FstProperties[src]

fn sub_assign(&mut self, other: FstProperties)[src]

Disables all flags enabled in the set.

impl UpperHex for FstProperties[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.