[−][src]Struct rustomaton::dfa::DFA
Implementations
impl<V: Eq + Hash + Display + Copy + Clone + Debug + Ord> DFA<V>
[src]
pub fn intersect(self, b: DFA<V>) -> DFA<V>
[src]
pub fn minimize(self) -> DFA<V>
[src]
The algorithm used is https://en.wikipedia.org/wiki/DFA_minimization#Brzozowski's_algorithm.
pub fn contains(&self, b: &DFA<V>) -> bool
[src]
A contains B if and only if for each word
w, if B accepts
w then A accepts
w.
pub fn to_dot(&self) -> String
[src]
Returns a string containing the dot description of the automaton
pub fn new_empty(alphabet: &HashSet<V>) -> DFA<V>
[src]
Returns an empty automaton with the given alphabet.
pub fn from_raw(
alphabet: HashSet<V>,
initial: usize,
finals: HashSet<usize>,
transitions: Vec<HashMap<V, usize>>
) -> Result<Self, FromRawError<V>>
[src]
alphabet: HashSet<V>,
initial: usize,
finals: HashSet<usize>,
transitions: Vec<HashMap<V, usize>>
) -> Result<Self, FromRawError<V>>
Returns an automaton built from the raw arguments.
Trait Implementations
impl<V: Eq + Hash + Display + Copy + Clone + Debug + Ord> Add<DFA<V>> for DFA<V>
[src]
The addition fo A and B is an automaton that accepts a word if and only if A or B accept it.
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: DFA<V>) -> DFA<V>
[src]
impl<V: Eq + Hash + Display + Copy + Clone + Debug + Ord> Automata<V> for DFA<V>
[src]
fn run(&self, v: &[V]) -> bool
[src]
fn is_complete(&self) -> bool
[src]
fn is_reachable(&self) -> bool
[src]
fn is_coreachable(&self) -> bool
[src]
fn is_trimmed(&self) -> bool
[src]
fn is_empty(&self) -> bool
[src]
fn is_full(&self) -> bool
[src]
fn negate(self) -> DFA<V>
[src]
fn complete(self) -> DFA<V>
[src]
fn make_reachable(self) -> DFA<V>
[src]
fn make_coreachable(self) -> DFA<V>
[src]
fn trim(self) -> DFA<V>
[src]
fn reverse(self) -> DFA<V>
[src]
impl<V: Eq + Hash + Display + Copy + Clone + Debug + Ord> Buildable<V> for DFA<V>
[src]
fn unite(self, b: DFA<V>) -> DFA<V>
[src]
fn concatenate(self, b: DFA<V>) -> DFA<V>
[src]
fn kleene(self) -> DFA<V>
[src]
fn at_most(self, u: usize) -> DFA<V>
[src]
fn at_least(self, u: usize) -> DFA<V>
[src]
fn repeat<R: RangeBounds<usize>>(self, r: R) -> DFA<V>
[src]
impl<V: Clone + Eq + Hash + Display + Copy + Debug + Ord> Clone for DFA<V>
[src]
impl<V: Debug + Eq + Hash + Display + Copy + Clone + Ord> Debug for DFA<V>
[src]
impl FromStr for DFA<char>
[src]
type Err = String
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<DFA<char>, Self::Err>
[src]
impl<V: Eq + Hash + Display + Copy + Clone + Debug + Ord> Mul<DFA<V>> for DFA<V>
[src]
The multiplication of A and B is A.concatenate(B)
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, other: DFA<V>) -> DFA<V>
[src]
impl<V: Eq + Hash + Display + Copy + Clone + Debug + Ord> Neg for DFA<V>
[src]
The negation of A is A.negate().
impl<V: Eq + Hash + Display + Copy + Clone + Debug + Ord> Not for DFA<V>
[src]
The opposite of A is A.reverse().
impl<V: Eq + Hash + Display + Copy + Clone + Debug + Ord> PartialEq<Automaton<V>> for DFA<V>
[src]
impl<V: Eq + Hash + Display + Copy + Clone + Debug + Ord> PartialEq<DFA<V>> for Automaton<V>
[src]
impl<V: Eq + Hash + Display + Copy + Clone + Debug + Ord> PartialEq<DFA<V>> for DFA<V>
[src]
impl<V: Eq + Hash + Display + Copy + Clone + Debug + Ord> PartialEq<DFA<V>> for NFA<V>
[src]
impl<V: Eq + Hash + Display + Copy + Clone + Debug + Ord> PartialEq<DFA<V>> for Regex<V>
[src]
impl<V: Eq + Hash + Display + Copy + Clone + Debug + Ord> PartialEq<NFA<V>> for DFA<V>
[src]
impl<V: Eq + Hash + Display + Copy + Clone + Debug + Ord> PartialEq<Regex<V>> for DFA<V>
[src]
impl<V: Eq + Hash + Display + Copy + Clone + Debug + Ord> PartialOrd<DFA<V>> for DFA<V>
[src]
fn partial_cmp(&self, other: &DFA<V>) -> Option<Ordering>
[src]
fn lt(&self, other: &DFA<V>) -> bool
[src]
fn le(&self, other: &DFA<V>) -> bool
[src]
fn gt(&self, other: &DFA<V>) -> bool
[src]
fn ge(&self, other: &DFA<V>) -> bool
[src]
impl<V: Eq + Hash + Display + Copy + Clone + Debug + Ord> Sub<DFA<V>> for DFA<V>
[src]
The substraction of A and B is an automaton that accepts a word if and only if A accepts it and B doesn't.
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, other: DFA<V>) -> DFA<V>
[src]
impl<V: Eq + Hash + Display + Copy + Clone + Debug + Ord> ToDfa<V> for DFA<V>
[src]
impl<V: Eq + Hash + Display + Copy + Clone + Debug + Ord> ToNfa<V> for DFA<V>
[src]
impl<V: Eq + Hash + Display + Copy + Clone + Debug + Ord> ToRegex<V> for DFA<V>
[src]
Auto Trait Implementations
impl<V> RefUnwindSafe for DFA<V> where
V: RefUnwindSafe,
V: RefUnwindSafe,
impl<V> Send for DFA<V> where
V: Send,
V: Send,
impl<V> Sync for DFA<V> where
V: Sync,
V: Sync,
impl<V> Unpin for DFA<V> where
V: Unpin,
V: Unpin,
impl<V> UnwindSafe for DFA<V> where
V: UnwindSafe,
V: 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> 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>,