4. Hierarchy

Tulip provides a system for the management of graphs hierarchies. The hierarchy sub-window displays the existing instances of subgraphs or groups with their relationships, the user can change the current view of the graph by clicking directly on the tree. When clicking the right mouse button, a pop-up menu is displayed, it allows to manage the instances of cluster : remove, clone, create subgraph.

Definitions :

Subgraphs :

A graph can have several parts of itself : these are stored in the subgraph instances. Some clustering algorithms can made subgraphs. A subgraph share its elements with the graph, it is just a part of the graph. It is possible to add properties for the subgraph only or to use the inherited properties.

For more information please visit : Wikipedia: Subgraphs

Groups :

Some graph can be a subgraph of an other graph. This kind of hierarchy enables to assign a graph to a node.

Meta-graph :

A meta-graph is a graph that contains meta-nodes.

Meta-node :

A meta-node, is a node that contain a group. A meta node can contain / refer to the root graph (Fractal effect).

Screen shots :

Following is an over view of a graph hierarchy :

The graph :

The subgraph and the meta-node :

The group :

Creating subgraphs or Groups :

Creating a subgraph :

To create a subgraph follow these steps :

  • 1 . Select a few Nodes with the selection tool. (Shift + click, will add a node to the selection) To select the edges that are between the selected nodes use the "Induced Sub-graph" algorithm.

  • 2 . Create a subgraph : from the menu Edit->Create Subgraph, or from the keyboard, Ctrl + Shift + G. Give it a name.

You will be able to find your new subgraph in the hierarchy onglet of the info editor window.

Creating a group :

To create a group follow these steps :

  • 1 . Select a few Nodes with the selection tool. (Shift + click, will add a node to the selection) To select the edges that are between the selected nodes use the "Induced Sub-graph" algorithm.

  • 2 . Create a group : From the menu Edit->Create group, or from the keyboard Control + G. A warning saying "Grouping can not be done on the root graph a subgraph will be created" may pop up, if it does, just click OK.

You will be able to find your new group in the hierarchy onglet of the info editor window.

Severals subgraphs will be created :

  • A copy of the root graph called "groups" containing a meta-graph with a new meta-node pointing to our group.

  • A subgraph which is our new group.

Removing / Ungrouping a subgraph or a Group :

Groups :

Remove .

To remove a group, press the mouse right button (press Ctrl key when mouse pressing on Mac) when on its name (in the Hierachy tab of Graph editor), and choose 'Remove' in the displayed contextual menu.

By deleting a group, all nodes in this group will be deleted as well, whereas the meta-node will still exist.

Ungroup .

To ungroup a group, press the mouse right button (press Ctrl key when mouse pressing on Mac) when on the group, and choose 'Ungroup' in the displayed contextual menu

By ungrouping a group, all the layouts properties of the group's nodes will be applied to the root graph. The subgraphs created with the group wont be deleted.

Subgraphs :

To remove a subgraph, press the mouse right button (press Ctrl key when mouse pressing on Mac) when on its name (in the Hierachy tab of Graph editor), and choose 'Remove' in the displayed contextual menu.

Removing a subgraph has no effects on the root graph.

Using subgraphs or groups :

Subgraphs

Moving a node in a subgraph.

If you move a node in a subgraph, the same node will be moved in the root graph.

Using an algorithm on a subgraph

If you use a layout algorithm on a subgraph, all changed layout properties will be applied to the root graph.

If you use a Measure algorithm on a subgraph, New local properties will be created. Those properties wont be applied to the root graphs.

Groups :

Changes on groups, wont be applied to the root graph unless you ungroup the group.

Algorithms that create subgraphs :

You can find those algorithms in the menu Algorithm => General.