- Type Parameters:
V- the vertex typeE- the edge type
For example, for a subgraph named "subg" with DefaultEdges (1, 2) and (2, 3) between Integer
vertices 1, 2, and 3, with the subgraph attribute pencolor set to transparent,
and the cluster attribute shape set to point, the DOT export of the subgraph will
be:
subgraph subg {
subg [ shape="point" ]
pencolor=transparent;
1;
2;
3;
1 -- 2;
2 -- 3;
}
- Author:
- Nicolas Rol <nicolas.rol at rte-france.com>
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDOTSubgraph(AsSubgraph<V, E> subgraph, Map<String, Attribute> subgraphAttributes, Map<String, Attribute> clusterAttributes) Constructs a new DOTSubgraph with specified subgraph, attributes.DOTSubgraph(AsSubgraph<V, E> subgraph, Map<String, Attribute> subgraphAttributes, Map<String, Attribute> clusterAttributes, boolean exportVertices, boolean exportEdges) Constructs a new DOTSubgraph with specified subgraph, attributes, and export options. -
Method Summary
Modifier and TypeMethodDescriptionedgeSet()Get the edges of the subgraph.Get the cluster attributes in a preserved order.AsSubgraph<V, E> Get the subgraph.Get the subgraph attributes in a preserved order.booleanWhether to export the subgraph edges in the DOT export.booleanWhether to export the subgraph vertices in the DOT export.Get the vertices of the subgraph.
-
Constructor Details
-
DOTSubgraph
public DOTSubgraph(AsSubgraph<V, E> subgraph, Map<String, Attribute> subgraphAttributes, Map<String, Attribute> clusterAttributes, boolean exportVertices, boolean exportEdges) Constructs a new DOTSubgraph with specified subgraph, attributes, and export options.- Parameters:
subgraph- the subgraph to be exportedsubgraphAttributes- attributes for the subgraphclusterAttributes- attributes for the clusterexportVertices- whether to export verticesexportEdges- whether to export edges
-
DOTSubgraph
public DOTSubgraph(AsSubgraph<V, E> subgraph, Map<String, Attribute> subgraphAttributes, Map<String, Attribute> clusterAttributes) Constructs a new DOTSubgraph with specified subgraph, attributes.- Parameters:
subgraph- the subgraph to be exportedsubgraphAttributes- attributes for the subgraphclusterAttributes- attributes for the cluster
-
-
Method Details
-
getSubgraph
Get the subgraph.- Returns:
- the subgraph
-
getSubgraphAttributes
Get the subgraph attributes in a preserved order.- Returns:
- the subgraph attributes.
-
getClusterAttributes
Get the cluster attributes in a preserved order.- Returns:
- the cluster attributes.
-
vertexSet
Get the vertices of the subgraph.- Returns:
- the vertices of the subgraph
-
edgeSet
Get the edges of the subgraph.- Returns:
- the edges of the subgraph
-
isExportVertices
public boolean isExportVertices()Whether to export the subgraph vertices in the DOT export.If
true, vertices will be included in the DOT export by writing their identifiers one by one on successive lines, with the same formalism as the main graph's vertices.For example, for a subgraph with DefaultEdges (1, 2) and (2, 3) between Integer vertices 1, 2, and 3, the DOT export of the vertices will be:
1; 2; 3;- Returns:
trueif vertices should be exported,falseotherwise.
-
isExportEdges
public boolean isExportEdges()Whether to export the subgraph edges in the DOT export.If
true, edges will be included in the DOT export by writing the identifiers of their respective source and target vertices on successive lines, with the same formalism as the main graph's edges.For example, for a subgraph with DefaultEdges (1, 2) and (2, 3) between Integer vertices 1, 2, and 3, the DOT export of the edges will be:
1 -- 2; 2 -- 3;- Returns:
trueif edges should be exported,falseotherwise.
-