pethgraph-graphml and docs/comments

This commit is contained in:
elvis
2025-07-10 15:02:14 +02:00
parent 0fb1ca97a0
commit 869d46c7b2
14 changed files with 64 additions and 21 deletions

View File

@ -1,7 +1,10 @@
//! Module for helper structure for simulation
use super::structure::{RSlabel, RSprocess, RSset, RSsystem};
use super::transitions::unfold;
use std::rc::Rc;
///
#[derive(Clone, Debug)]
pub struct TransitionsIterator<'a> {
choices_iterator: std::vec::IntoIter<(Rc<RSset>, Rc<RSprocess>)>,
@ -25,6 +28,7 @@ impl<'a> TransitionsIterator<'a> {
impl<'a> Iterator for TransitionsIterator<'a> {
type Item = (RSlabel, RSsystem);
/// Creates the next arc from the current system.
fn next(&mut self) -> Option<(RSlabel, RSsystem)> {
let (c, k) = self.choices_iterator.next()?;
let t = self.system.available_entities.union(c.as_ref());