Advertisement
Guest User

Untitled

a guest
Apr 27th, 2015
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. package ru.kpfu.dfs.graph.adapter;
  2.  
  3. import ru.kpfu.dfs.graph.Graph;
  4.  
  5. import java.util.List;
  6.  
  7. /**
  8. * @author Alexeev Vladimir 27.04.2015
  9. */
  10. public class DirectedGraph implements Graph {
  11.  
  12. private Graph graph;
  13.  
  14. private DirectedGraph() {}
  15.  
  16. public DirectedGraph(Graph graph) {
  17. this.graph = graph;
  18. }
  19.  
  20. @Override
  21. public void joinVertices(int from, int to) {
  22. graph.joinVertices(from, to);
  23. }
  24.  
  25. @Override
  26. public List<Integer> adjacentVertices(int vertex) {
  27. return graph.adjacentVertices(vertex);
  28. }
  29.  
  30. @Override
  31. public int size() {
  32. return graph.size();
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement