/** * {@inheritDoc} */ @Override public boolean removeEdge(E e) { return delegate.removeEdge(e); }
/** * {@inheritDoc} */ @Override public E removeEdge(V sourceVertex, V targetVertex) { return delegate.removeEdge(sourceVertex, targetVertex); }
public Scope removeEdge( FlowElement sourceVertex, FlowElement targetVertex ) { return graph.removeEdge( sourceVertex, targetVertex ); }
public boolean removeEdge( Scope scope ) { return graph.removeEdge( scope ); }
static public <V, E> void removeLoops(Graph<V, E> g) { for (V v : g.vertexSet()) { g.removeEdge(v, v); } }
/** * Removes the specified edge from the graph. Removes the specified edge from this graph if it * is present. * * @param edge edge to be removed from this graph, if present. * @return this builder object * * @see Graph#removeEdge(Object) */ public B removeEdge(E edge) { this.graph.removeEdge(edge); return this.self(); }
/** * Removes an edge going from source vertex to target vertex from the graph being built, if such * vertices and such edge exist in the graph. * * @param source source vertex of the edge. * @param target target vertex of the edge. * * @return this builder object * * @see Graph#removeVertex(Object) */ public B removeEdge(V source, V target) { this.graph.removeEdge(source, target); return this.self(); }
private <S, D> void addEdge( final Class<S> source, final Class<D> target, final Function<? super S, ? extends D> implicit) { edgeFactory.addImplicitConversion(source, target, implicit); implicits.removeEdge(source, target); Objects.requireNonNull(implicits.addEdge(source, target)); }
if (!other.equals(v) && !target.containsEdge(v, other)) { if (!addInsteadOfRewire) { target.removeEdge(e);
if (!transitivelyReducedMatrix[i].get(j)) { directedGraph .removeEdge(directedGraph.getEdge(vertices.get(i), vertices.get(j)));
@Override protected void transformGraph(List<E> previousPath) { V source, target; E reversedEdge; // replace previous path edges with reversed edges with negative weight for (E originalEdge : previousPath) { source = workingGraph.getEdgeSource(originalEdge); target = workingGraph.getEdgeTarget(originalEdge); double originalEdgeWeight = workingGraph.getEdgeWeight(originalEdge); workingGraph.removeEdge(originalEdge); workingGraph.addEdge(target, source); reversedEdge = workingGraph.getEdge(target, source); workingGraph.setEdgeWeight(reversedEdge, -originalEdgeWeight); } }
@Override protected void transformGraph(List<E> previousPath) { for (E edge : this.workingGraph.edgeSet()) { V source = workingGraph.getEdgeSource(edge); V target = workingGraph.getEdgeTarget(edge); double modifiedWeight = this.workingGraph.getEdgeWeight(edge) - singleSourcePaths.getWeight(target) + singleSourcePaths.getWeight(source); this.workingGraph.setEdgeWeight(edge, modifiedWeight); } E reversedEdge; for (E originalEdge : previousPath) { double zeroWeight = workingGraph.getEdgeWeight(originalEdge); if (zeroWeight != 0) { throw new IllegalStateException("Expected zero weight edge along the path"); } V source = workingGraph.getEdgeSource(originalEdge); V target = workingGraph.getEdgeTarget(originalEdge); workingGraph.removeEdge(originalEdge); workingGraph.addEdge(target, source); reversedEdge = workingGraph.getEdge(target, source); workingGraph.setEdgeWeight(reversedEdge, zeroWeight); } }