Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ru.kpfu.dfs.graph.adapter;
- import ru.kpfu.dfs.graph.Graph;
- import java.util.List;
- /**
- * @author Alexeev Vladimir 27.04.2015
- */
- public class DirectedGraph implements Graph {
- private Graph graph;
- private DirectedGraph() {}
- public DirectedGraph(Graph graph) {
- this.graph = graph;
- }
- @Override
- public void joinVertices(int from, int to) {
- graph.joinVertices(from, to);
- }
- @Override
- public List<Integer> adjacentVertices(int vertex) {
- return graph.adjacentVertices(vertex);
- }
- @Override
- public int size() {
- return graph.size();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement