Graphviz - Drawing maximal cliques

后端 未结 3 465
滥情空心
滥情空心 2021-02-04 16:05

I want to use graphviz in order to draw for a given graph all the maximal cliques that it has. Therefore I would like that nodes in the same maximal clique will be visually enca

3条回答
  •  独厮守ぢ
    2021-02-04 16:37

    I don't think you can do this. Clusters are done via subgraphs, which are expected to be separate graphs, not overlapping with other subgraphs.

    You could change the visualisation though; if you imagine that the members of a clique are members of some set S, then you could simply add a node S and add directed or dashed edges linking each member to the S node. If the S nodes are given a different shape, then it should be clear which nodes are in which cliques.

    If you really want, you can give the edges connecting members to their clique node high weights, which should bring them close together on the graph.

    Note that there would never be edges between the clique nodes; that would indicate that two cliques are maximally connected, which just implies they are in fact one large clique, not two separate ones.

提交回复
热议问题