Test functions

Python components for testing list colourings of graphs.

  • Matthew Henderson (2010-12-23): initial version

EXAMPLES:

has_colour(list_assignment, vertex, colour)

Decides whether or not ‘colour’ is a member of the list assigned to ‘vertex’ by the ‘list_assignment’.

is_exact(graph, colouring)

Decides whether exactly every vertex of ‘graph’ is coloured.

is_independent(graph, nodes)

Decides whether of not the subgraph of ‘graph’ induced by nodes in ‘nodes’ is an independent set or not.

is_list_colouring(graph, list_assignment, colouring)

Decides whether or not ‘colouring’ is a list colouring of ‘graph’, according to the ‘list_assignment’ given.

is_proper(graph, colouring)

Decides whether or not ‘colouring’ is a proper colouring of the vertices of ‘graph’.

is_proper_list_colouring(graph, list_assignment, colouring)

Decides whether or not ‘colouring’ is a proper list colouring of ‘graph’, according to the ‘list_assignment’ given.

Previous topic

Models

Next topic

Utilities

This Page