package graph.examples; import graph.SimpleVertex; import graph.Edge; import graph.Graph; import graph.Vertex; import java.util.ArrayList; public class Directed { public Directed() { v1 = new SimpleVertex("1"); v2 = new SimpleVertex("2"); v3 = new SimpleVertex("3"); v4 = new SimpleVertex("4"); v5 = new SimpleVertex("5"); v6 = new SimpleVertex("6"); vertices = new ArrayList<Vertex>(); vertices.add(v1); vertices.add(v2); vertices.add(v3); vertices.add(v4); vertices.add(v5); vertices.add(v6); edges = new ArrayList<Edge>(); edges.add(new Edge(v1, v2)); edges.add(new Edge(v1, v4)); edges.add(new Edge(v2, v5)); edges.add(new Edge(v3, v6)); edges.add(new Edge(v3, v5)); edges.add(new Edge(v4, v2)); edges.add(new Edge(v5, v4)); edges.add(new Edge(v6, v6)); graph = new Graph(vertices, edges, true); } public Vertex getV1() { return v1; } public Vertex getV2() { return v2; } public Vertex getV3() { return v3; } public Vertex getV4() { return v4; } public Vertex getV5() { return v5; } public Vertex getV6() { return v6; } public Graph getGraph() { return graph; } private Vertex v1, v2, v3, v4, v5, v6; private ArrayList<Vertex> vertices; private ArrayList<Edge> edges; private Graph graph; }