implementing digraph generation

This commit is contained in:
elvis
2025-07-05 14:54:43 +02:00
parent 62740cce84
commit ad1ef6f6a6
7 changed files with 99 additions and 7 deletions

View File

@ -182,7 +182,7 @@ impl Default for RSreaction {
// -----------------------------------------------------------------------------
// RSprocess
// -----------------------------------------------------------------------------
#[derive(Clone, Debug)]
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub enum RSprocess {
Nill,
RecursiveIdentifier {
@ -475,6 +475,24 @@ impl RSsystem {
}
}
impl PartialEq for RSsystem {
// we ignore delta and reaction rules
fn eq(&self, other: &RSsystem) -> bool {
self.available_entities == other.available_entities &&
self.context_process == other.context_process
}
}
impl Eq for RSsystem {}
impl Hash for RSsystem {
// ignores delta and reaction rules
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
self.available_entities.hash(state);
self.context_process.hash(state);
}
}
impl Default for RSsystem {
fn default() -> Self {
RSsystem::new()