Package org.openjgraph.model.adjacencymatrix

Examples of org.openjgraph.model.adjacencymatrix.AdjacencyMatrixGraph.addVertex()


            AdjacencyMatrixGraph graph = new AdjacencyMatrixGraph();
            AdjacencyMatrixVertex v1 = new AdjacencyMatrixVertex(graph, "A");
            AdjacencyMatrixVertex v2 = new AdjacencyMatrixVertex(graph, "B");
            AdjacencyMatrixVertex v3 = new AdjacencyMatrixVertex(graph, "C");
            AdjacencyMatrixVertex v4 = new AdjacencyMatrixVertex(graph, "D");
            graph.addVertex("A");
            graph.addVertex("B");
            graph.addVertex("C");
            graph.addVertex("D");
            graph.addEdge("A", "B");
            graph.addEdge("A", "C");
View Full Code Here


            AdjacencyMatrixVertex v1 = new AdjacencyMatrixVertex(graph, "A");
            AdjacencyMatrixVertex v2 = new AdjacencyMatrixVertex(graph, "B");
            AdjacencyMatrixVertex v3 = new AdjacencyMatrixVertex(graph, "C");
            AdjacencyMatrixVertex v4 = new AdjacencyMatrixVertex(graph, "D");
            graph.addVertex("A");
            graph.addVertex("B");
            graph.addVertex("C");
            graph.addVertex("D");
            graph.addEdge("A", "B");
            graph.addEdge("A", "C");
View Full Code Here

            AdjacencyMatrixVertex v2 = new AdjacencyMatrixVertex(graph, "B");
            AdjacencyMatrixVertex v3 = new AdjacencyMatrixVertex(graph, "C");
            AdjacencyMatrixVertex v4 = new AdjacencyMatrixVertex(graph, "D");
            graph.addVertex("A");
            graph.addVertex("B");
            graph.addVertex("C");
            graph.addVertex("D");
            graph.addEdge("A", "B");
            graph.addEdge("A", "C");

            Set<Edge> edgeSet = v1.getEdges();
View Full Code Here

            AdjacencyMatrixVertex v3 = new AdjacencyMatrixVertex(graph, "C");
            AdjacencyMatrixVertex v4 = new AdjacencyMatrixVertex(graph, "D");
            graph.addVertex("A");
            graph.addVertex("B");
            graph.addVertex("C");
            graph.addVertex("D");
            graph.addEdge("A", "B");
            graph.addEdge("A", "C");

            Set<Edge> edgeSet = v1.getEdges();
            assertEquals(2, edgeSet.size());
View Full Code Here

    public void testGetVertex1() {

        AdjacencyMatrixGraph graph = new AdjacencyMatrixGraph(5);

        graph.addVertex("A");
        graph.addVertex("B");
        graph.addVertex("C");
        graph.addVertex("D");
        graph.addVertex("E");
View Full Code Here

    public void testGetVertex1() {

        AdjacencyMatrixGraph graph = new AdjacencyMatrixGraph(5);

        graph.addVertex("A");
        graph.addVertex("B");
        graph.addVertex("C");
        graph.addVertex("D");
        graph.addVertex("E");

        try {
View Full Code Here

        AdjacencyMatrixGraph graph = new AdjacencyMatrixGraph(5);

        graph.addVertex("A");
        graph.addVertex("B");
        graph.addVertex("C");
        graph.addVertex("D");
        graph.addVertex("E");

        try {
            graph.addEdge("A", "B");
View Full Code Here

        AdjacencyMatrixGraph graph = new AdjacencyMatrixGraph(5);

        graph.addVertex("A");
        graph.addVertex("B");
        graph.addVertex("C");
        graph.addVertex("D");
        graph.addVertex("E");

        try {
            graph.addEdge("A", "B");
            graph.addEdge("A", "C");
View Full Code Here

        graph.addVertex("A");
        graph.addVertex("B");
        graph.addVertex("C");
        graph.addVertex("D");
        graph.addVertex("E");

        try {
            graph.addEdge("A", "B");
            graph.addEdge("A", "C");
            graph.addEdge("B", "C");
View Full Code Here

                    assertTrue("Impossible d'ajouter l'arete (" + i + "," + j +")",false);
                }
            }
        }

        graph.addVertex("11");
       
        Set<Vertex> newVertexSet = graph.getVertexSet();
        assertEquals(11, newVertexSet.size());
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.