public static <V, E extends GEdge<V>> Set<V> toVertices(Collection<E> edges) {
		Set<V> result = new HashSet<>();
		for (E e : edges) {
			result.add(e.getStart());
			result.add(e.getEnd());
		}
		return result;
	}
Returns the set of vertices contained within the given edges.

@param edges the edges
@return the vertices
Ghidra/Framework/Graph/src/main/java/ghidra/graph/GraphAlgorithms.java