Struct pns::Net [−][src]
#[repr(C)]pub struct Net { pub transition_count: u32, pub place_count: u32, // some fields omitted }
Expand description
A type representing a petri net. It only stores the initial state, not the state used for simulatoin.
Fields
transition_count: u32
The count of transitions of the petri net
place_count: u32
The count of places of the petri net
Implementations
Remove a transition at index tid
from petri net.
Make a connection into transition with index tid
from place with index pid
.
Result represents success.
Remove the connection out from transition with index tid
to place with index pid
.
Trait Implementations
A slice of nodes representing the transitions of the petri net.
Returns the index of the next reusable transition.
Returns the index of the next reusable place.
A slice of initial token counts for the places of the petri net.
Add a new transition to the petri net and get the index.
Add a new transition to the petri net, connct it to the specified places and get the index.
Remove a place at index pid
from petri net.
Make a connection out from the transitoin with index tid
to place with index pid
.
Result represents success. Read more
Make a connection into transition with index tid
from place with index pid
.
Duplicate the transition and get the index of the clone.
Duplicate the place and get the index of the clone.
Increase the initial token count in place indexed by pid
.
Creates a dynamic net type from a net.
Auto Trait Implementations
impl RefUnwindSafe for Net
impl UnwindSafe for Net
Blanket Implementations
Mutably borrows from an owned value. Read more