Returns a string representation of graph. Encodes edge direction if graph is directed.
(Graph<?> graph)
| 375 | |
| 376 | |
| 377 | public static String toString(Graph<?> graph) { |
| 378 | if (graph instanceof Network) { |
| 379 | return toString((Network<?, ?>) graph); |
| 380 | } |
| 381 | return String.format(GRAPH_FORMAT, getPropertiesString(graph), graph.nodes(), adjacentNodesString(graph)); |
| 382 | } |
| 383 | |
| 384 | /** |
| 385 | * Returns a string representation of {@code graph}. Encodes edge direction if {@code graph} |
no test coverage detected