Skip to content

Global functions

platypus.V(/, graph)

Returns the vertices of a graph.

platypus.E(/, graph)

Returns the edges of a graph.

Graph generators

platypus.P(/, n)

Generates a path graph with n vertices

platypus.C(/, n)

Generates a cycle graph with n vertices

platypus.K(*args)

Generates a complete k-partite graph.

Expects as input a sequence of integers which correspond to the sizes of the partite sets. For example, K(5) will generate a (a clique on five vertices) or K(2,5) a (a biclique with two vertices on one side and five on the other).

  • *args: A list of integers specifying the size of the partite sets.
platypus.S(/, n)

Generates a star graph with n leaves