pub struct ACSLocState {
loc_state: Vec<u32>,
}Expand description
Assignment of process counts to a location
The LocationState tracks how many processes are in each location of the threshold automaton.
Use this type with care. LocationStates of different automata
should never be indexed by locations of other automata.
Fields§
§loc_state: Vec<u32>Vector counting how many processes are in each location
Implementations§
Source§impl ACSLocState
impl ACSLocState
Sourcepub fn into_iterator_loc_n_procs(
&self,
) -> impl Iterator<Item = (ACSLocation, u32)>
pub fn into_iterator_loc_n_procs( &self, ) -> impl Iterator<Item = (ACSLocation, u32)>
Iterate over the configurations and the number of processes in these locations
Sourcepub fn compute_predecessors_min_basis(&self, rule: &CSRule) -> Self
pub fn compute_predecessors_min_basis(&self, rule: &CSRule) -> Self
Compute the minimal basis of the predecessor
This function assumes that self is the minimal basis of an upwards
closed set of locations and computes the minimal basis of a state from
which an element in self can be reached using CSRule.
In particular this means that the predecessor generated here, can have
more processes than self.
fn new_all_zero(ta: &ACSThresholdAutomaton) -> Self
Sourcepub fn compute_target_cfg(
spec: &TargetConfig,
ta: &ACSThresholdAutomaton,
) -> Self
pub fn compute_target_cfg( spec: &TargetConfig, ta: &ACSThresholdAutomaton, ) -> Self
Get the ACSLocState that corresponds to the target configuration
Sourcepub fn display(&self, ta: &ACSThresholdAutomaton) -> String
pub fn display(&self, ta: &ACSThresholdAutomaton) -> String
Get a string representation of the location state
Sourcepub fn display_compact(&self, ta: &ACSThresholdAutomaton) -> String
pub fn display_compact(&self, ta: &ACSThresholdAutomaton) -> String
Get a string representation of the location state, leaving out locations with zero processes in them
Trait Implementations§
Source§impl Clone for ACSLocState
impl Clone for ACSLocState
Source§fn clone(&self) -> ACSLocState
fn clone(&self) -> ACSLocState
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ACSLocState
impl Debug for ACSLocState
Source§impl Hash for ACSLocState
impl Hash for ACSLocState
Source§impl Index<&ACSLocation> for ACSLocState
impl Index<&ACSLocation> for ACSLocState
Source§impl Index<ACSLocation> for ACSLocState
impl Index<ACSLocation> for ACSLocState
Source§impl IndexMut<&ACSLocation> for ACSLocState
impl IndexMut<&ACSLocation> for ACSLocState
Source§impl IndexMut<ACSLocation> for ACSLocState
impl IndexMut<ACSLocation> for ACSLocState
Source§impl Ord for ACSLocState
impl Ord for ACSLocState
Source§fn cmp(&self, other: &ACSLocState) -> Ordering
fn cmp(&self, other: &ACSLocState) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ACSLocState
impl PartialEq for ACSLocState
Source§impl PartialOrd for ACSLocState
impl PartialOrd for ACSLocState
Source§impl PartialOrder for ACSLocState
impl PartialOrder for ACSLocState
fn part_cmp(&self, other: &Self) -> PartialOrdCompResult
Source§fn is_greater_or_equal(&self, other: &Self) -> bool
fn is_greater_or_equal(&self, other: &Self) -> bool
self is greater or equal to other in the partial orderSource§fn is_smaller_or_equal(&self, other: &Self) -> bool
fn is_smaller_or_equal(&self, other: &Self) -> bool
self is smaller or equal to other in the partial orderimpl Eq for ACSLocState
impl StructuralPartialEq for ACSLocState
Auto Trait Implementations§
impl Freeze for ACSLocState
impl RefUnwindSafe for ACSLocState
impl Send for ACSLocState
impl Sync for ACSLocState
impl Unpin for ACSLocState
impl UnwindSafe for ACSLocState
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