public Set<E> outgoingEdgesOf(V vertex) { Set<E> res = new HashSet<E>(); if (getG1().containsVertex(vertex)) { res.addAll(getG1().outgoingEdgesOf(vertex)); } if (getG2().containsVertex(vertex)) { res.addAll(getG2().outgoingEdgesOf(vertex)); } return Collections.unmodifiableSet(res); }
public Set<E> getAllEdges(V sourceVertex, V targetVertex) { Set<E> res = new HashSet<E>(); if (g1.containsVertex(sourceVertex) && g1.containsVertex(targetVertex)) { res.addAll(g1.getAllEdges(sourceVertex, targetVertex)); } if (g2.containsVertex(sourceVertex) && g2.containsVertex(targetVertex)) { res.addAll(g2.getAllEdges(sourceVertex, targetVertex)); } return Collections.unmodifiableSet(res); }
public Set<E> edgesOf(V vertex) { Set<E> res = new HashSet<E>(); if (g1.containsVertex(vertex)) { res.addAll(g1.edgesOf(vertex)); } if (g2.containsVertex(vertex)) { res.addAll(g2.edgesOf(vertex)); } return Collections.unmodifiableSet(res); }
public Set<V> vertexSet() { Set<V> res = new HashSet<V>(); res.addAll(g1.vertexSet()); res.addAll(g2.vertexSet()); return Collections.unmodifiableSet(res); }
public Set<E> edgeSet() { Set<E> res = new HashSet<E>(); res.addAll(g1.edgeSet()); res.addAll(g2.edgeSet()); return Collections.unmodifiableSet(res); }