find(self,
from_states=None,
to_states=None,
with_attr_dict=None,
typed_only=False,
**with_attr)
|
|
Find all edges between given states with given labels.
Instead of having two separate methods to:
-
find all labels of edges between given states (s1, s2)
-
find all transitions (s1, s2, L) with given label L, possibly from
some given state s1, i.e., the edges leading to the successor states
Post(s1, a) = Post(s1) restricted by action a
this method provides both functionalities.
Preimage under edge labeling function L of given label, intersected
with given subset of edges:
L^{-1}(desired_label) \cap (from_states x to_states)
See Also
add, add_adj
- Parameters:
from_states (
-
iterable of existing states, or
-
None (no constraint, default)
) - edges must start from this subset of states
to_states (
-
iterable of existing states, or
-
None (no constraint, default)
) - edges must end in this subset of states
with_attr_dict (
-
{label_type : desired_label_value, ...}, or
-
None (no constraint, default)
) - edges must be annotated with these labels
with_attr - label type-value pairs, take precedence over
desired_label .
- Returns: list of transitions:
= list of labeled edges
= [(from_state, to_state, label),...]
where:
-
from_state in from_states
-
to_state in to_states
-
label : dict
- set of transitions = labeled edges:
(from_state, to_state, label)
such that:
(from_state, to_state )
in from_states x to_states
|