iqm.applications.graph_utils

iqm.applications.graph_utils#

Contains utility functions regarding graphs which are generic enough that they deserve having their own module.

Functions

draw_problem([problem_instance, ...])

High-level wrapper that prepares and visualizes a problem graph.

plot_graph(plot_data)

Renders the graph using matplotlib and networkx.

prepare_plot_data(data[, seed])

Generates all layout and color data required for visualization.

relabel_graph_nodes(graph)

Map original node labels of the Graph to consecutive integers starting from 0.

residual_degree(graph, node, visited)

The degree of node in the graph, with regards to only non-visited nodes.

Classes

PlotData(graph, pos, node_colors, ...)

Precomputed visualization information used for drawing the graph.

ProblemData(graph, orig_to_new_mapping, ...)

Normalized problem information extracted and validated before plotting.

Inheritance

Inheritance diagram of iqm.applications.graph_utils