EGI.vertices_where_predicate
- EGI.vertices_where_predicate(predicate, data=False)
Get vertices 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 2 parameters: the vertex identifier and the vertex attributs, and should return True or False.
data (bool, optional) – If True, yield the vertex attributes in addition to the vertex identifiers.
- Yields
int | tuple[int, dict[str, Any]] – If data is False, the next vertex that matches the condition. If data is True, the next vertex and its attributes.
Examples
>>>