Diagram.edges_where_predicate
-
Diagram.edges_where_predicate(predicate, data=False) Get edges for which a certain condition or set of conditions is true using a lambda function.
- Parameters
predicate (callable) – The condition you want to evaluate. The callable takes 3 parameters:
u,v,attrand should returnTrueorFalse.data (bool, optional) – Yield the vertices and their data attributes. Default is
False.
- Yields
2-tuple – The next edge as a (u, v) tuple, if
data=False.3-tuple – The next edge as a (u, v, data) tuple, if
data=True.
Examples
>>>