Class DirectedWeightedGraphBuilderBase<V,​E,​G extends DirectedGraph<V,​E> & WeightedGraph<V,​E>,​B extends DirectedWeightedGraphBuilderBase<V,​E,​G,​B>>

    • Constructor Detail

      • DirectedWeightedGraphBuilderBase

        public DirectedWeightedGraphBuilderBase​(G baseGraph)
        Creates a builder based on baseGraph. baseGraph must be mutable.
        Parameters:
        baseGraph - the graph object to base building on
    • Method Detail

      • addEdge

        public B addEdge​(V source,
                         V target,
                         double weight)
        Adds an weighted edge to the graph being built. The source and target vertices are added to the graph, if not already included.
        Parameters:
        source - source vertex of the edge.
        target - target vertex of the edge.
        weight - weight of the edge.
        Returns:
        this builder object
        See Also:
        Graphs.addEdgeWithVertices(Graph, Object, Object, double)
      • addEdge

        public B addEdge​(V source,
                         V target,
                         E edge,
                         double weight)
        Adds the specified weighted edge to the graph being built. The source and target vertices are added to the graph, if not already included.
        Parameters:
        source - source vertex of the edge.
        target - target vertex of the edge.
        edge - edge to be added to this graph.
        weight - weight of the edge.
        Returns:
        this builder object
        See Also:
        Graph.addEdge(Object, Object, Object), WeightedGraph.setEdgeWeight(Object, double)