Package dijkstra

Examples of dijkstra.Dijkstra


    maze.clear();
    DBox depart = maze.getD();
    if( depart != null){


      Dijkstra dijkstraObjet = new Dijkstra();
      ArrayList<VertexInterface> chemin = null;

      chemin = dijkstraObjet.dijkstra((GraphInterface)maze, depart).getShortestPathsTo(this.maze.getA());

      if(chemin.size() == 0) { // Pas de chemin : on affiche une boite de dialogue
        JOptionPane.showMessageDialog(null, "Le labyrinthe n'a pas de chemin solution", "Pas de chemin", JOptionPane.INFORMATION_MESSAGE);

      } else {
View Full Code Here

TOP

Related Classes of dijkstra.Dijkstra

Copyright © 2018 www.massapicom. 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.