Git Product home page Git Product logo

dijkstrajs's People

Contributors

tcort avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dijkstrajs's Issues

line 102 and its declaration above seemingly don't do anything

The value of predecessor (singular) is seemingly never read, only assigned.

predecessor = predecessors[u];

from:

 extract_shortest_path_from_predecessor_list: function(predecessors, d) {
    var nodes = [];
    var u = d;
    var predecessor;
    while (u) {
      nodes.push(u);
      predecessor = predecessors[u];
      u = predecessors[u];
    }
    nodes.reverse();
    return nodes;
  }

If you agree, I can create a PR to remove it.

fail case handling

Hello Thomas, first off, thanks for the great library. Your dijkstrajs is working great.

Just one question, i'm implementing your library to multi floors pathfinding problem and, unfortunately I do not want to simply join the graphs because sometimes the path will give us transferring the floor only because they are the shortest path.

Therefore, I would like to simply go over and try to find the pah each floor and if cannot find the path, I would like to handle the error case, e.g. if...else... then..
In order to handle the case, do you know if I could detect the error 'cannot find the path...' just like promise .then and .catch chaining method?

Apology if this is not the right place to ask.
Thank you.

Incorrect path

List listaDeArestas = [[a, b], [a, h], [b, c], [b, h], [c, d], [c, f], [c, i], [d, e], [d, f], [e, f], [f, g], [g, h], [g, i], [h, i]]
List output1 = Dijkstra.findPathFromPairsList(listaDeArestas, "a", "e");
print(output1);

prints [a, b, c, d, e], but [a, b, c, f, e] is the correct

i need to get the summed up weight of the shortest path

i am using it for a scenario where 2 point lead to a single room or 2 entrances of a room i need to compare shortest path for both entrances if we get the total weight of shortest path it would be really easy to compare shortest paths

Implement more effective priority queue

First off, thank you for making the ground stone library, which is currently in use in famous libraries and utilities. I think that the usage of this library must encourage implementing the algorithm more effectively. Therefore, I created a pull request with the improvements.

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.