Combinatorial Optimization Generators tools
Generators used to solve combinatorial problems could return a parsed result. This parsed result is a class containing:
- class qat.opt.results.GraphPartitioningResult(graph, *args, **kwargs)
Class describing a graph partitioning. This class allows for the representation of a solution of a graph combinatorial optimization problem under the form of a networkx graph to provide a visual display to the solution
- 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
K-Clique result
Generator KCliqueGenerator
will cast the Result
returned by the QPU
into a KCliqueResult
(which is a subclass of GraphPartitioningResult
)
Vertex cover result
Generator VertexCoverGenerator
will cast the Result
returned by the QPU
into a VertexCoverResult
(which is a subclass of GraphPartitioningResult
)