Package org.openjgraph.model.adjacencymatrix

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


       
        graph.setVertex(vertexSet);
        try {
            graph.addEdge("A", "B");
            graph.addEdge("A", "C");
            graph.addEdge("B", "C");
            graph.addEdge("B", "D");

            System.out.println(graph.toString());
            assertTrue(true);
View Full Code Here


       
        graph.setVertex(vertexSet);
        try {
            graph.addEdge("A", "B");
            graph.addEdge("A", "C");
            graph.addEdge("B", "C");
            graph.addEdge("B", "D");

            System.out.println(graph.toString());
            assertTrue(true);
View Full Code Here

        graph.setVertex(vertexSet);
        try {
            graph.addEdge("A", "B");
            graph.addEdge("A", "C");
            graph.addEdge("B", "C");
            graph.addEdge("B", "D");

            System.out.println(graph.toString());
            assertTrue(true);

            System.out.println("Vertex:");
View Full Code Here

        // on créé un graphe avec une capacité de 2 et on lui ajoute plus de
        // sommet que possible. Il ne devrait pas y avoir d'erreur.
        AdjacencyMatrixGraph graph = new AdjacencyMatrixGraph(2);
        graph.setVertex(vertexSet);
        try {
            graph.addEdge("sommet 1", "sommet 2");
            graph.addEdge("sommet 1", "sommet 3");
            graph.addEdge("sommet 2", "sommet 3");
            graph.addEdge("sommet 2", "sommet 4");

            assertTrue(true);
View Full Code Here

        // sommet que possible. Il ne devrait pas y avoir d'erreur.
        AdjacencyMatrixGraph graph = new AdjacencyMatrixGraph(2);
        graph.setVertex(vertexSet);
        try {
            graph.addEdge("sommet 1", "sommet 2");
            graph.addEdge("sommet 1", "sommet 3");
            graph.addEdge("sommet 2", "sommet 3");
            graph.addEdge("sommet 2", "sommet 4");

            assertTrue(true);
        }
View Full Code Here

        AdjacencyMatrixGraph graph = new AdjacencyMatrixGraph(2);
        graph.setVertex(vertexSet);
        try {
            graph.addEdge("sommet 1", "sommet 2");
            graph.addEdge("sommet 1", "sommet 3");
            graph.addEdge("sommet 2", "sommet 3");
            graph.addEdge("sommet 2", "sommet 4");

            assertTrue(true);
        }
        catch(VertexNotFoundException e) {
View Full Code Here

        graph.setVertex(vertexSet);
        try {
            graph.addEdge("sommet 1", "sommet 2");
            graph.addEdge("sommet 1", "sommet 3");
            graph.addEdge("sommet 2", "sommet 3");
            graph.addEdge("sommet 2", "sommet 4");

            assertTrue(true);
        }
        catch(VertexNotFoundException e) {
            assertTrue("sommet non trouvé dans le graphe", false);
View Full Code Here

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

        try {
            graph.addEdge("A", "B");
            graph.addEdge("A", "C");
            graph.addEdge("B", "C");
            graph.addEdge("B", "D");

            Set<Vertex> vertexSet2 = graph.getVertexSet();
View Full Code Here

        graph.addVertex("D");
        graph.addVertex("E");

        try {
            graph.addEdge("A", "B");
            graph.addEdge("A", "C");
            graph.addEdge("B", "C");
            graph.addEdge("B", "D");

            Set<Vertex> vertexSet2 = graph.getVertexSet();
            for( Vertex v : vertexSet2 ) {
View Full Code Here

        graph.addVertex("E");

        try {
            graph.addEdge("A", "B");
            graph.addEdge("A", "C");
            graph.addEdge("B", "C");
            graph.addEdge("B", "D");

            Set<Vertex> vertexSet2 = graph.getVertexSet();
            for( Vertex v : vertexSet2 ) {
                String vId = v.getId();
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.