GraphOptimizationApplication¶
- class GraphOptimizationApplication(graph)[ソース]¶
ベースクラス:
OptimizationApplication
An abstract class for graph optimization applications.
- パラメータ:
graph (Graph | ndarray | List) – A graph representing a problem. It can be specified directly as a NetworkX graph, or as an array or list format suitable to build out a NetworkX graph.
Attributes
Getter of the graph
Methods
draw
([result, pos])Draw a graph with the result.
interpret
(result)Convert the calculation result of the problem (
OptimizationResult
or a binary array using np.ndarray) to the answer of the problem in an easy-to-understand format.random_graph
(num_nodes, num_edges[, seed])- param num_nodes:
The number of nodes in a graph
sample_most_likely
(state_vector)Compute the most likely binary string from state vector.
Convert a problem instance into a
QuadraticProgram