Algorithm for drawing directed acyclic graphs
First Claim
Patent Images
1. A computer-implemented method for drawing directed acyclic graphs, the method comprising:
- receiving, in a computing system comprising at least one computer processor, information representing a directed acyclic graph;
providing the information to the at least one computer processor of the computing system;
generating a layout of the directed acyclic graph utilizing the computing system, the layout comprised of one or more subgraphs, each subgraph comprising two or more nodes and edges that connect pairs of nodes, the nodes and edges being defined in x- and y-coordinates;
reducing the number of edge crossings in the layout of the directed acyclic graph utilizing the computing system;
straightening the edges of the layout of the directed acyclic graph utilizing the computing system, the straightening increasing a number of vertical edges in the directed acyclic graph;
compacting the one or more subgraphs along x-coordinate axis to generate a compacted directed acyclic graph layout associated with a compacted directed acyclic graph utilizing the computing system; and
assigning new y-coordinates to the nodes of the one or more subgraphs such that the nodes do not overlap in the y-coordinate to generate a new directed acyclic graph utilizing the computing system, wherein assigning new y-coordinates comprises;
computing, for each level of a plurality of levels of the layout of the directed acyclic graph, a weight function that is the ratio of a square of incoming edges to the each level and a number of nodes at the each level; and
adjusting vertical separation between adjacent levels of the plurality of levels in proportion with computed weight functions associated with the adjacent levels.
1 Assignment
0 Petitions
Accused Products
Abstract
A system and method for drawing directed acyclic graphs is disclosed. In particular, an algorithm, as implemented in a method and system, to aesthetically layout directed acyclic graphs is presented. The algorithm includes methods to reduce the number of edge crossings and increase the number of straight edges in such drawings. The algorithm keeps short and straight edges wherever possible and gives preference to vertical edges. It also provides an edge-crossing reduction heuristic to refine the layout obtained after standard median heuristic layout, and further provides a method to focus on important paths in the graph through layout.
-
Citations
18 Claims
-
1. A computer-implemented method for drawing directed acyclic graphs, the method comprising:
-
receiving, in a computing system comprising at least one computer processor, information representing a directed acyclic graph; providing the information to the at least one computer processor of the computing system; generating a layout of the directed acyclic graph utilizing the computing system, the layout comprised of one or more subgraphs, each subgraph comprising two or more nodes and edges that connect pairs of nodes, the nodes and edges being defined in x- and y-coordinates; reducing the number of edge crossings in the layout of the directed acyclic graph utilizing the computing system; straightening the edges of the layout of the directed acyclic graph utilizing the computing system, the straightening increasing a number of vertical edges in the directed acyclic graph; compacting the one or more subgraphs along x-coordinate axis to generate a compacted directed acyclic graph layout associated with a compacted directed acyclic graph utilizing the computing system; and assigning new y-coordinates to the nodes of the one or more subgraphs such that the nodes do not overlap in the y-coordinate to generate a new directed acyclic graph utilizing the computing system, wherein assigning new y-coordinates comprises; computing, for each level of a plurality of levels of the layout of the directed acyclic graph, a weight function that is the ratio of a square of incoming edges to the each level and a number of nodes at the each level; and adjusting vertical separation between adjacent levels of the plurality of levels in proportion with computed weight functions associated with the adjacent levels. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A computer program product comprising a machine-readable medium storing instructions that, when executed by at least one programmable processor, cause the at least one programmable processor to perform operations comprising:
-
generating a layout of the directed acyclic graph, the layout comprised of one or more subgraphs, each subgraph comprising two or more nodes and edges that connect pairs of nodes, the nodes and edges being defined in x- and y-coordinates; reducing the number of edge crossings in the layout of the directed acyclic graph, the reducing comprising moving at least one node of the two or more nodes to a location closer to other one or more nodes with which the at least one node shares descendent nodes in the layout; straightening the edges of the layout of the directed acyclic graph; compacting the nodes of the one or more subgraphs along x-coordinate axis to generate a compacted directed acyclic graph layout; and assigning new y-coordinates to the nodes of the one or more subgraphs such that the nodes do not overlap in the y-coordinate to generate a new layout for directed acyclic graph, wherein assigning new y-coordinates comprises; computing, for each level of a plurality of levels of the layout of the directed acyclic graph, a weight function that is the ratio of a square of incoming edges to the each level and a number of nodes at the each level; and adjusting vertical separation between adjacent levels of the plurality of levels in proportion with computed weight functions associated with the adjacent levels. - View Dependent Claims (11, 12, 13, 14, 15, 16)
-
-
17. A system comprising:
-
at least one programmable processor; and a machine-readable medium storing instructions that, when executed by the at least one processor, cause the at least one programmable processor to perform operations comprising; receiving information representing a directed acyclic graph; generating a layout of the directed acyclic graph, the layout comprising two or more nodes and edges that connect pairs of nodes, the nodes and edges being defined in x- and y-coordinate; reducing the number of edge crossings in the layout of the directed acyclic graph; straightening the edges of the layout of the directed acyclic graph, the straightening increasing a number of vertical edges in the directed acyclic graph; compacting along x-coordinate axis to generate a compacted directed acyclic graph layout; and assigning new y-coordinates to the nodes of the compacted directed acyclic graph layout such that the nodes do not overlap in the y-coordinate, to generate a new layout for directed acyclic graph, wherein assigning new y-coordinates comprises; computing, for each level of a plurality of levels of the layout of the directed acyclic graph, a weight function that is the ratio of a square of incoming edges to the each level and a number of nodes at the each level; and adjusting vertical separation between adjacent levels of the plurality of levels in proportion with computed weight functions associated with the adjacent levels. - View Dependent Claims (18)
-
Specification