HalfEdge.edges_where_predicate

HalfEdge.edges_where_predicate(predicate, data=False)[source]

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, attr and should return True or False.

  • 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

>>>