HalfEdge.get_any_vertices

HalfEdge.get_any_vertices(n, exclude_leaves=False)[source]

Get a list of identifiers of a random set of n vertices.

Parameters
  • n (int) – The number of random vertices.

  • exclude_leaves (bool (False)) – Exclude the leaves (vertices with only one connected edge) from the set. Default is to include the leaves.

Returns

list – The identifiers of the vertices.