All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.psjava.ds.graph.MutableDirectedGraph Maven / Gradle / Ivy

The newest version!
package org.psjava.ds.graph;

import org.psjava.ds.Collection;

public class MutableDirectedGraph> implements Graph {

	public static > MutableDirectedGraph create() {
		return new MutableDirectedGraph();
	}

	private MutableGraph graph = MutableGraph.create();

	public void insertVertex(V v) {
		graph.insertVertex(v);
	}

	public void addEdge(E edge) {
		graph.addEdge(edge.from(), edge);
	}

	@Override
	public Collection getVertices() {
		return graph.getVertices();
	}

	@Override
	public Iterable getEdges(V v) {
		return graph.getEdges(v);
	}

	@Override
	public String toString() {
		return graph.toString();
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy