[−][src]Struct tree_automata::bottom_up::Automaton
Tree automaton.
Implementations
impl<F: Symbol, Q: State, L: Label> Automaton<F, Q, L>
[src]
pub fn new() -> Automaton<F, Q, L>
[src]
Create a new empty automaton.
pub fn len(&self) -> usize
[src]
Return the number of states in the automaton.
pub fn states(&self) -> States<'_, F, Q, L>
[src]
pub fn final_states(&self) -> Iter<'_, Q>
[src]
Return an iterator to the final states of the automaton.
pub fn set_final(&mut self, q: Q) -> bool
[src]
Set the given state a final state.
Return true
if the state was not already final.
Return false
if the state was already a final state.
pub fn includes(&self, q: &Q) -> bool
[src]
Checks if the given state is in the automaton. Return true if at least one configuration is attached to the state in the automaton.
pub fn transitions(&self) -> Transifions<'_, F, Q, L>ⓘNotable traits for Transifions<'a, F, Q, L>
impl<'a, F, Q: State, L: Label> Iterator for Transifions<'a, F, Q, L> type Item = (&'a Configuration<F, Q>, &'a L, &'a Q);
[src]
Notable traits for Transifions<'a, F, Q, L>
impl<'a, F, Q: State, L: Label> Iterator for Transifions<'a, F, Q, L> type Item = (&'a Configuration<F, Q>, &'a L, &'a Q);
pub fn configurations_for_state(&self, q: &Q) -> Configurations<'_, F, Q, L>
[src]
Return an iterator over the configurations connected to the given state.
pub fn states_for_configuration(
&self,
conf: &Configuration<F, Q>
) -> Iter<'_, Labeled<Q, L>>
[src]
&self,
conf: &Configuration<F, Q>
) -> Iter<'_, Labeled<Q, L>>
Return an iterator over the states connected to the given configuration.
pub fn add(&mut self, conf: Configuration<F, Q>, label: L, state: Q)
[src]
Add a new transition to the automaton.
pub fn add_normalized<P: PatternLike<F, Q>, N>(
&mut self,
pattern: &P,
normalizer: &mut N
) -> Q where
N: FnMut(&Configuration<F, Q>) -> Labeled<Q, L>,
[src]
&mut self,
pattern: &P,
normalizer: &mut N
) -> Q where
N: FnMut(&Configuration<F, Q>) -> Labeled<Q, L>,
Add new transitions in the automaton by adding and normalizing the given configuration, label and state.
pub fn common_configurations<'a>(
automata: &'a [&'a Automaton<F, Q, L>],
positions: &'a [Q]
) -> CommonConfigurations<'a, F, Q, L>ⓘNotable traits for CommonConfigurations<'a, F, Q, L>
impl<'a, F: Symbol, Q: State, L: Label> Iterator for CommonConfigurations<'a, F, Q, L> type Item = Vec<Labeled<Configuration<F, Q>, L>>;
[src]
automata: &'a [&'a Automaton<F, Q, L>],
positions: &'a [Q]
) -> CommonConfigurations<'a, F, Q, L>ⓘ
Notable traits for CommonConfigurations<'a, F, Q, L>
impl<'a, F: Symbol, Q: State, L: Label> Iterator for CommonConfigurations<'a, F, Q, L> type Item = Vec<Labeled<Configuration<F, Q>, L>>;
Automata common configurations.
pub fn representatives(&self) -> Representatives<'_, F, Q, L>ⓘNotable traits for Representatives<'a, F, Q, L>
impl<'a, F: Symbol, Q: State, L: Label> Iterator for Representatives<'a, F, Q, L> type Item = Term<F>;
[src]
Notable traits for Representatives<'a, F, Q, L>
impl<'a, F: Symbol, Q: State, L: Label> Iterator for Representatives<'a, F, Q, L> type Item = Term<F>;
Return an iterator over the representative terms of the automaton. The representatives terms are all the terms recognized by the automaton without cycle. Together they trigger every transition of the automaton.
pub fn complement(&mut self)
[src]
Complement the automaton.
This will invert the set of final and non-final states.
If the automaton is complete, then self
becomes its own complement.
pub fn alphabet(&self) -> HashSet<F>
[src]
Return the alphabet on which this automaton is defined.
pub fn map_states<R: State, M>(&self, g: M) -> Automaton<F, R, L> where
M: Fn(&Q) -> R,
[src]
M: Fn(&Q) -> R,
impl<F: Symbol, Q: State> Automaton<F, Q, NoLabel>
[src]
pub fn complete_with<'a, A: Iterator<Item = &'a F>, R: State>(
&mut self,
alphabet: A,
lang: &Automaton<F, R, NoLabel>
) where
F: 'a + Ranked,
R: From<Q>,
Q: From<R>,
[src]
&mut self,
alphabet: A,
lang: &Automaton<F, R, NoLabel>
) where
F: 'a + Ranked,
R: From<Q>,
Q: From<R>,
Complete the language with the given automaton.
Each state of self
must be mappable into a state of lang
, and each state of lang
must be transformed into a dead state of self
.
Trait Implementations
impl<F: Clone, Q: Clone + State, L: Clone + Label> Clone for Automaton<F, Q, L>
[src]
impl<F: Symbol + Display, Q: State + Display, L: Label + Display> Display for Automaton<F, Q, L>
[src]
impl<'a, F: Symbol, Q: State, L: Label> From<&'a Automaton<F, Q, L>> for Automaton<F, Q, u32>
[src]
impl<'a, F: Symbol, E, Q: LanguageState<F, E>> From<(Q, &'a E)> for Automaton<F, Q, NoLabel>
[src]
impl<'a, F: Symbol, Q: LanguageState<F, ()>> From<Q> for Automaton<F, Q, NoLabel>
[src]
impl<F: Symbol, Q: State, L: Label> Language<F> for Automaton<F, Q, L>
[src]
impl<F: Symbol, Q: State> LanguageState<F, Automaton<F, Q, NoLabel>> for Q
[src]
fn configurations<'a>(
&self,
aut: &'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Self>> + 'a>
[src]
&self,
aut: &'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Self>> + 'a>
Auto Trait Implementations
impl<F, Q, L> RefUnwindSafe for Automaton<F, Q, L> where
F: RefUnwindSafe,
L: RefUnwindSafe,
Q: RefUnwindSafe,
F: RefUnwindSafe,
L: RefUnwindSafe,
Q: RefUnwindSafe,
impl<F, Q, L> Send for Automaton<F, Q, L> where
F: Send,
L: Send,
Q: Send,
F: Send,
L: Send,
Q: Send,
impl<F, Q, L> Sync for Automaton<F, Q, L> where
F: Sync,
L: Sync,
Q: Sync,
F: Sync,
L: Sync,
Q: Sync,
impl<F, Q, L> Unpin for Automaton<F, Q, L> where
F: Unpin,
L: Unpin,
Q: Unpin,
F: Unpin,
L: Unpin,
Q: Unpin,
impl<F, Q, L> UnwindSafe for Automaton<F, Q, L> where
F: UnwindSafe,
L: UnwindSafe,
Q: UnwindSafe,
F: UnwindSafe,
L: UnwindSafe,
Q: 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<F, Q> LanguageState<F, Automaton<F, Q, NoLabel>> for Q where
F: Symbol,
Q: State,
[src]
F: Symbol,
Q: State,
fn configurations(
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
[src]
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
impl<F, Q> LanguageState<F, Automaton<F, Q, NoLabel>> for Q where
F: Symbol,
Q: State,
[src]
F: Symbol,
Q: State,
fn configurations(
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
[src]
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
impl<F, Q> LanguageState<F, Automaton<F, Q, NoLabel>> for Q where
F: Symbol,
Q: State,
[src]
F: Symbol,
Q: State,
fn configurations(
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
[src]
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
impl<F, Q> LanguageState<F, Automaton<F, Q, NoLabel>> for Q where
F: Symbol,
Q: State,
[src]
F: Symbol,
Q: State,
fn configurations(
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
[src]
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
impl<F, Q> LanguageState<F, Automaton<F, Q, NoLabel>> for Q where
F: Symbol,
Q: State,
[src]
F: Symbol,
Q: State,
fn configurations(
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
[src]
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
impl<F, Q> LanguageState<F, Automaton<F, Q, NoLabel>> for Q where
F: Symbol,
Q: State,
[src]
F: Symbol,
Q: State,
fn configurations(
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
[src]
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
impl<F, Q> LanguageState<F, Automaton<F, Q, NoLabel>> for Q where
F: Symbol,
Q: State,
[src]
F: Symbol,
Q: State,
fn configurations(
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
[src]
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
impl<F, Q> LanguageState<F, Automaton<F, Q, NoLabel>> for Q where
F: Symbol,
Q: State,
[src]
F: Symbol,
Q: State,
fn configurations(
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
[src]
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
impl<F, Q> LanguageState<F, Automaton<F, Q, NoLabel>> for Q where
F: Symbol,
Q: State,
[src]
F: Symbol,
Q: State,
fn configurations(
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
[src]
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
impl<F, Q> LanguageState<F, Automaton<F, Q, NoLabel>> for Q where
F: Symbol,
Q: State,
[src]
F: Symbol,
Q: State,
fn configurations(
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
[src]
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
impl<F, Q> LanguageState<F, Automaton<F, Q, NoLabel>> for Q where
F: Symbol,
Q: State,
[src]
F: Symbol,
Q: State,
fn configurations(
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
[src]
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
impl<F, Q> LanguageState<F, Automaton<F, Q, NoLabel>> for Q where
F: Symbol,
Q: State,
[src]
F: Symbol,
Q: State,
fn configurations(
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
[src]
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
impl<F, Q> LanguageState<F, Automaton<F, Q, NoLabel>> for Q where
F: Symbol,
Q: State,
[src]
F: Symbol,
Q: State,
fn configurations(
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
[src]
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
impl<F, Q> LanguageState<F, Automaton<F, Q, NoLabel>> for Q where
F: Symbol,
Q: State,
[src]
F: Symbol,
Q: State,
fn configurations(
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
[src]
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
impl<F, Q> LanguageState<F, Automaton<F, Q, NoLabel>> for Q where
F: Symbol,
Q: State,
[src]
F: Symbol,
Q: State,
fn configurations(
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
[src]
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
impl<F, Q> LanguageState<F, Automaton<F, Q, NoLabel>> for Q where
F: Symbol,
Q: State,
[src]
F: Symbol,
Q: State,
fn configurations(
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
[src]
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
impl<F, Q> LanguageState<F, Automaton<F, Q, NoLabel>> for Q where
F: Symbol,
Q: State,
[src]
F: Symbol,
Q: State,
fn configurations(
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
[src]
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
impl<F, Q> LanguageState<F, Automaton<F, Q, NoLabel>> for Q where
F: Symbol,
Q: State,
[src]
F: Symbol,
Q: State,
fn configurations(
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
[src]
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
impl<F, Q> LanguageState<F, Automaton<F, Q, NoLabel>> for Q where
F: Symbol,
Q: State,
[src]
F: Symbol,
Q: State,
fn configurations(
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
[src]
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
impl<F, Q> LanguageState<F, Automaton<F, Q, NoLabel>> for Q where
F: Symbol,
Q: State,
[src]
F: Symbol,
Q: State,
fn configurations(
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
[src]
&Self,
&'a Automaton<F, Q, NoLabel>
) -> Box<dyn Iterator<Item = Configuration<F, Q>> + 'a>
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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,