Class NetworkBuilder<N,​E>


  • @Beta
    public final class NetworkBuilder<N,​E>
    extends java.lang.Object
    A builder for constructing instances of MutableNetwork with user-defined properties.

    A network built by this class will have the following properties by default:

    Example of use:

    
     MutableNetwork<String, Integer> flightNetwork =
         NetworkBuilder.directed().allowsParallelEdges(true).build();
     flightNetwork.addEdge("LAX", "ATL", 3025);
     flightNetwork.addEdge("LAX", "ATL", 1598);
     flightNetwork.addEdge("ATL", "LAX", 2450);
     
    Since:
    20.0
    Author:
    James Sexton, Joshua O'Madadhain