V
- the graph vertex typeE
- the graph edge typeG
- type of the resulting graphB
- type of this builderpublic abstract class DirectedWeightedGraphBuilderBase<V,E,G extends DirectedGraph<V,E> & WeightedGraph<V,E>,B extends DirectedWeightedGraphBuilderBase<V,E,G,B>> extends DirectedGraphBuilderBase<V,E,G,B>
DirectedWeightedGraphBuilder
for extending.graph
Constructor and Description |
---|
DirectedWeightedGraphBuilderBase(G baseGraph)
Creates a builder based on
baseGraph . |
Modifier and Type | Method and Description |
---|---|
B |
addEdge(V source,
V target,
double weight)
Adds an weighted edge to the graph being built.
|
B |
addEdge(V source,
V target,
E edge,
double weight)
Adds the specified weighted edge to the graph being built.
|
buildUnmodifiable
addEdge, addEdge, addEdgeChain, addGraph, addVertex, addVertices, build, removeEdge, removeEdge, removeVertex, removeVertices, self
public DirectedWeightedGraphBuilderBase(G baseGraph)
baseGraph
. baseGraph
must be mutable.baseGraph
- the graph object to base building onpublic B addEdge(V source, V target, double weight)
source
- source vertex of the edge.target
- target vertex of the edge.weight
- weight of the edge.Graphs.addEdgeWithVertices(Graph, Object, Object, double)
public B addEdge(V source, V target, E edge, double weight)
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.Graph.addEdge(Object, Object, Object)
,
WeightedGraph.setEdgeWeight(Object, double)
Copyright © 2017. All rights reserved.