pub struct PartialOrderTrace {
pub attributes: Attributes,
pub event_map: HashMap<EventHash, Event>,
pub partial_relations: HashSet<(EventHash, EventHash)>,
}Expand description
A partial order trace of Events.
Contains all events of a trace and their particular partial relations.
Fields§
§attributes: AttributesTrace-level attributes
event_map: HashMap<EventHash, Event>§partial_relations: HashSet<(EventHash, EventHash)>The partial relations between the Events contained in the PartialOrderTrace.
Implementations§
Source§impl PartialOrderTrace
impl PartialOrderTrace
Sourcepub fn new() -> Self
pub fn new() -> Self
Create new PartialOrderTrace with no events and no partial relations.
Sourcepub fn get_start_events(&self) -> HashSet<&Event>
pub fn get_start_events(&self) -> HashSet<&Event>
Returns all the start events of the PartialOrderTrace, i.e., the events having no
preceding event.
Sourcepub fn get_end_events(&self) -> HashSet<&Event>
pub fn get_end_events(&self) -> HashSet<&Event>
Returns all the end events of the PartialOrderTrace, i.e., the events having no
succeeding event.
Sourcepub fn add_event(&mut self, event: &Event)
pub fn add_event(&mut self, event: &Event)
Adds an Event to the PartialOrderTrace.
Sourcepub fn remove_event(&mut self, event: &Event)
pub fn remove_event(&mut self, event: &Event)
Removes an Event from the PartialOrderTrace including all partial relations
containing the Event itself.
Sourcepub fn add_partial_relation(&mut self, from: &Event, to: &Event)
pub fn add_partial_relation(&mut self, from: &Event, to: &Event)
Adds a partial relation by adding two EventHash values.
Sourcepub fn remove_partial_relation(&mut self, from: &Event, to: &Event)
pub fn remove_partial_relation(&mut self, from: &Event, to: &Event)
Removes a partial relation identified by two EventHash values.
Sourcepub fn get_ingoing_events(&self, event: &Event) -> Vec<&Event>
pub fn get_ingoing_events(&self, event: &Event) -> Vec<&Event>
Returns all events preceding an Event.
Sourcepub fn get_outgoing_events(&self, event: &Event) -> Vec<&Event>
pub fn get_outgoing_events(&self, event: &Event) -> Vec<&Event>
Returns all events succeeding an Event.
Sourcepub fn to_graph(&self, classifier: &EventLogClassifier) -> Graph<String, &str>
pub fn to_graph(&self, classifier: &EventLogClassifier) -> Graph<String, &str>
Creates a Graph from the PartialOrderTrace.
Sourcepub fn is_isomorphic(
&self,
other: &PartialOrderTrace,
classifier: &EventLogClassifier,
other_classifier: &EventLogClassifier,
) -> bool
pub fn is_isomorphic( &self, other: &PartialOrderTrace, classifier: &EventLogClassifier, other_classifier: &EventLogClassifier, ) -> bool
By creating a Graph for each PartialOrderTrace and for two given EventLogClassifier
used for classification in each PartialOrderTrace, the partial order traces are compared
for equality by checking whether their graphs are isomorphic.
Sourcepub fn export_png<P: AsRef<Path>>(
&self,
classifier: &EventLogClassifier,
path: P,
) -> Result<(), Error>
pub fn export_png<P: AsRef<Path>>( &self, classifier: &EventLogClassifier, path: P, ) -> Result<(), Error>
Export directly-follows graph as a PNG image
The PNG file is written to the specified filepath
Note: This is an export method for visualizing the directly-follows graph.
Only available with the graphviz-export feature.
Sourcepub fn export_svg<P: AsRef<Path>>(
&self,
classifier: &EventLogClassifier,
path: P,
) -> Result<(), Error>
pub fn export_svg<P: AsRef<Path>>( &self, classifier: &EventLogClassifier, path: P, ) -> Result<(), Error>
Export directly-follows graph as an SVG image.
The SVG file is written to the specified filepath.
Note: This is an export method for visualizing the directly-follows graph.
Only available with the graphviz-export feature.
Trait Implementations§
Source§impl Clone for PartialOrderTrace
impl Clone for PartialOrderTrace
Source§fn clone(&self) -> PartialOrderTrace
fn clone(&self) -> PartialOrderTrace
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PartialOrderTrace
impl Debug for PartialOrderTrace
Source§impl Default for PartialOrderTrace
impl Default for PartialOrderTrace
Source§impl<'de> Deserialize<'de> for PartialOrderTrace
impl<'de> Deserialize<'de> for PartialOrderTrace
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for PartialOrderTrace
impl RefUnwindSafe for PartialOrderTrace
impl Send for PartialOrderTrace
impl Sync for PartialOrderTrace
impl Unpin for PartialOrderTrace
impl UnwindSafe for PartialOrderTrace
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more