pub struct StochasticProcessTree {
pub activity_key: ActivityKey,
pub tree: Vec<Node>,
pub transition2node: Vec<usize>,
pub weights: Vec<Fraction>,
pub termination_weight: Fraction,
}Fields§
§activity_key: ActivityKey§tree: Vec<Node>§transition2node: Vec<usize>§weights: Vec<Fraction>§termination_weight: FractionImplementations§
Source§impl StochasticProcessTree
impl StochasticProcessTree
pub fn node_to_lpn( &self, node: usize, net: &mut LabelledPetriNet, translator: &ActivityKeyTranslator, source: usize, sink: usize, ) -> Result<usize>
Source§impl StochasticProcessTree
impl StochasticProcessTree
pub fn get_number_of_nodes(&self) -> usize
pub fn get_node(&self, node: usize) -> Option<&Node>
pub fn root(&self) -> usize
pub fn get_node_of_transition( &self, transition: TransitionIndex, ) -> Result<&Node>
Sourcepub fn get_parent(&self, node: usize) -> Option<(usize, usize)>
pub fn get_parent(&self, node: usize) -> Option<(usize, usize)>
Returns the parent of node. Notice that this is an expensive operation; avoid if possible.
@param node @return The parent of node, and the rank of the child
Sourcepub fn get_child_rank_with(
&self,
parent: usize,
grand_child: usize,
) -> Option<usize>
pub fn get_child_rank_with( &self, parent: usize, grand_child: usize, ) -> Option<usize>
@param parent @param grandChild @return The number of the child within parent that contains grandChild. If grandChild is not a child of parent, will return -1.
pub fn get_children(&self, node: usize) -> StochasticChildrenIterator<'_> ⓘ
pub fn get_parents(&self, node: usize) -> StochasticParentsIterator<'_> ⓘ
pub fn get_descendants(&self, node: usize) -> &[Node]
Sourcepub fn is_parent_of(&self, parent: usize, child: usize) -> bool
pub fn is_parent_of(&self, parent: usize, child: usize) -> bool
@param parent @param child @return Whether the child is a direct or indirect child of parent.
Sourcepub fn traverse(&self, node: usize) -> usize
pub fn traverse(&self, node: usize) -> usize
Find the next node of this node: the next sibling, and if that is not available, the next sibling up the tree. May return a non-existing node if there is no sibling.
pub fn get_child(&self, parent: usize, child_rank: usize) -> usize
pub fn get_number_of_children(&self, parent: usize) -> Option<usize>
pub fn node_to_transition(&self, node: usize) -> Option<usize>
pub fn import_as_labelled_petri_net( reader: &mut dyn BufRead, ) -> Result<EbiObject>
Source§impl StochasticProcessTree
impl StochasticProcessTree
pub fn node_to_string( &self, indent: usize, node: usize, f: &mut Formatter<'_>, ) -> Result<usize>
pub fn node_to_dot( &self, graph: &mut VisualGraph, node: usize, entry: &NodeHandle, exit: &NodeHandle, ) -> usize
Trait Implementations§
Source§impl Clone for StochasticProcessTree
impl Clone for StochasticProcessTree
Source§fn clone(&self) -> StochasticProcessTree
fn clone(&self) -> StochasticProcessTree
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StochasticProcessTree
impl Debug for StochasticProcessTree
Source§impl Display for StochasticProcessTree
impl Display for StochasticProcessTree
Source§impl Exportable for StochasticProcessTree
impl Exportable for StochasticProcessTree
Source§impl From<(ActivityKey, Vec<Node>, Vec<FractionEnum>, FractionEnum)> for StochasticProcessTree
impl From<(ActivityKey, Vec<Node>, Vec<FractionEnum>, FractionEnum)> for StochasticProcessTree
Source§impl From<(ProcessTree, Vec<FractionEnum>, FractionEnum)> for StochasticProcessTree
impl From<(ProcessTree, Vec<FractionEnum>, FractionEnum)> for StochasticProcessTree
Source§impl From<StochasticProcessTree> for LabelledPetriNet
impl From<StochasticProcessTree> for LabelledPetriNet
Source§fn from(value: StochasticProcessTree) -> Self
fn from(value: StochasticProcessTree) -> Self
Converts to this type from the input type.
Source§impl From<StochasticProcessTree> for LolaNet
impl From<StochasticProcessTree> for LolaNet
Source§fn from(value: StochasticProcessTree) -> Self
fn from(value: StochasticProcessTree) -> Self
Converts to this type from the input type.
Source§impl From<StochasticProcessTree> for ProcessTree
impl From<StochasticProcessTree> for ProcessTree
Source§fn from(value: StochasticProcessTree) -> Self
fn from(value: StochasticProcessTree) -> Self
Converts to this type from the input type.
Source§impl FromStr for StochasticProcessTree
impl FromStr for StochasticProcessTree
Source§impl Graphable for StochasticProcessTree
impl Graphable for StochasticProcessTree
fn to_dot(&self) -> Result<VisualGraph>
Source§impl HasActivityKey for StochasticProcessTree
impl HasActivityKey for StochasticProcessTree
fn activity_key(&self) -> &ActivityKey
fn activity_key_mut(&mut self) -> &mut ActivityKey
Source§impl Importable for StochasticProcessTree
impl Importable for StochasticProcessTree
Source§impl Infoable for StochasticProcessTree
impl Infoable for StochasticProcessTree
Source§impl TranslateActivityKey for StochasticProcessTree
impl TranslateActivityKey for StochasticProcessTree
Source§fn translate_using_activity_key(&mut self, to_activity_key: &mut ActivityKey)
fn translate_using_activity_key(&mut self, to_activity_key: &mut ActivityKey)
Change the activity key of this object, by translating all mentions of activities to the new activity key (which will be updated with activity labels it did not have yet.).
This is a potentially expensive operation. If only a part of the activities will be used, then consider using an ActivityKeyTranslator directly.
The activity key of this object will be updated too, so the activity keys will be equivalent afterwards.
Source§impl TryFrom<StochasticProcessTree> for PetriNet
impl TryFrom<StochasticProcessTree> for PetriNet
Auto Trait Implementations§
impl Freeze for StochasticProcessTree
impl RefUnwindSafe for StochasticProcessTree
impl Send for StochasticProcessTree
impl Sync for StochasticProcessTree
impl Unpin for StochasticProcessTree
impl UnwindSafe for StochasticProcessTree
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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