pydevDAG._graphs module

pydevDAG._graphs

Tools to build graphs of various kinds.

class pydevDAG._graphs.CompareGraph

Bases: object

Compare graphs with boolean result.

classmethod compare(graph1, graph2)

Calculate relationship between graph1 and graph2.

Parameters:
  • graph1 (DiGraph) – a graph
  • graph2 (DiGraph) – a graph
Returns:

0 if identical, 1 if equivalent, otherwise 2

Return type:

int

static equivalent(graph1, graph2)

Do graph1 and graph2 have the same shape?

The type of storage entity that a node represents is considered significant, but not its identity.

Parameters:
  • graph1 (DiGraph) – a graph
  • graph2 (DiGraph) – a graph
Returns:

True if the graphs are equivalent, otherwise False

Return type:

bool

static identical(graph1, graph2)

Are graph1 and graph2 identical?

The identity of every node matters.

Parameters:
  • graph1 (DiGraph) – a graph
  • graph2 (DiGraph) – a graph
Returns:

True if the graphs are identical, otherwise False

Return type:

boolean

class pydevDAG._graphs.DiffGraph

Bases: object

Take the difference of two graphs.

static do_diff(graph1, graph2, diff)

Generate the appropriate graph.

Parameters:
  • graph1 (DiGraph) – a graph
  • graph2 (DiGraph) – a graph
  • diff (str) – the diff to perform
class pydevDAG._graphs.DisplayGraph

Bases: object

Displaying a generated multigraph by transformation to a graphviz graph.

static convert_graph(graph)

Convert graph to graphviz format.

Parameters:graph (DiGraph) – the graph
Returns:a graphviz graph

Designate its general layout and mark or rearrange nodes as appropriate.

class pydevDAG._graphs.GenerateGraph

Bases: object

Coordinate graph generating activities.

static decorate_graph(context, graph)

Decorate a graph with additional properties.

Parameters:
  • context (Context) – the libudev context
  • graph (DiGraph) – the graph
static get_graph(context, name)

Get a complete graph storage graph.

Parameters:context (Context) – the libudev context
Returns:the generated graph
Return type:DiGraph
class pydevDAG._graphs.PrintGraph

Bases: object

Print a textual representation of the graph.

static print_graph(out, graph)

Print a graph.

Parameters:
  • out (file) – print destination
  • graph (DiGraph) – the graph

Table Of Contents

Previous topic

pydevDAG._display module

Next topic

pydevDAG._structure module

This Page