qat.opt.results.VertexCoverResult

The VertexCoverGenerator can return a parsed result that includes a parsed version of the best Sample, that could be displayed. The node subset that covers all the nodes in the graph can be accessed through the cover function.

class qat.opt.results.VertexCoverResult(graph, *args, **kwargs)

Result of a VertexCover problem. This class adds an attribute cover used to extract the vertex cover

property cover

Extract the nodes in the graph that forms the cover

display(with_figure=False, figsize=(6.4, 4.8), node_size=300, font_size=12, **kwargs)

Display the partitions using the draw_networkx method from networkx

Parameters
  • with_figure (bool, optional) – wrap the displayed in a matplotlib.pyplot figure

  • figsize (tuple, optional) – the size of the matplotlib.pyplot figure, only used if with_figure is True

  • node_size (int, optional) – the size of the node in the diagram passed to the draw_networkx function

  • font_size (int, optional) – the font size in the diagram passed to the draw_networkx function