Returns a NetworkBuilder initialized with all properties queryable from graph. The "queryable" properties are those that are exposed through the Network interface, such as Network#isDirected(). Other properties, such as #expectedNodeCount(int), are not set
(Network<N, E> graph)
| 81 | * {@link #expectedNodeCount(int)}, are not set in the new builder. |
| 82 | */ |
| 83 | public static <N, E> NetworkBuilder<N, E> from(Network<N, E> graph) { |
| 84 | return new NetworkBuilder<N, E>(graph.isDirected()) |
| 85 | .allowsParallelEdges(graph.allowsParallelEdges()) |
| 86 | .allowsSelfLoops(graph.allowsSelfLoops()); |
| 87 | } |
| 88 | |
| 89 | /** |
| 90 | * Specifies whether the graph will allow parallel edges. Attempting to add a parallel edge to |
no test coverage detected