AutomatonEncoding

Trait AutomatonEncoding 

Source
trait AutomatonEncoding {
    type EdgeLabel: Display + PartialEq;

    // Required methods
    fn get_name(&self) -> String;
    fn get_initial_locations(&self) -> impl Iterator<Item = String>;
    fn get_locations(&self) -> impl Iterator<Item = String>;
    fn get_transitions(
        &self,
    ) -> impl Iterator<Item = (String, Self::EdgeLabel, String)>;

    // Provided methods
    fn get_node_encoding(
        nodes: impl Iterator<Item = String>,
        node_options: &String,
    ) -> String { ... }
    fn get_edge_encoding(
        edges: impl Iterator<Item = (String, Self::EdgeLabel, String)>,
        edge_options: &String,
    ) -> String { ... }
}
Expand description

Trait for encoding an automaton (e.g. crate::general_threshold_automaton::GeneralThresholdAutomaton or other types implementing the ThresholdAutomaton trait into a graph in DOT format

Required Associated Types§

Source

type EdgeLabel: Display + PartialEq

Type for the edge labels

Required Methods§

Source

fn get_name(&self) -> String

Name of the automaton

Source

fn get_initial_locations(&self) -> impl Iterator<Item = String>

Initial locations of the automaton

Locations are the states of the automaton and must implement fmt::Display. The name will be used as the label in the DOT file.

Source

fn get_locations(&self) -> impl Iterator<Item = String>

Locations of the automaton

Get the locations of the automaton that are neither initial nor final Locations must implement fmt::Display. The name will be used as the label in the DOT file.

Source

fn get_transitions( &self, ) -> impl Iterator<Item = (String, Self::EdgeLabel, String)>

Get the transitions of the automaton

Provided Methods§

Source

fn get_node_encoding( nodes: impl Iterator<Item = String>, node_options: &String, ) -> String

Get the encoding of the nodes into the DOT format

Source

fn get_edge_encoding( edges: impl Iterator<Item = (String, Self::EdgeLabel, String)>, edge_options: &String, ) -> String

General function to enable the encoding of the edges into the DOT format with the given edge options

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§