{"action":"created","issue":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4694","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4694/labels{/name}","comments_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4694/comments","events_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4694/events","html_url":"https://github.com/orientechnologies/orientdb/pull/4694","id":98352436,"number":4694,"title":"Another version of the dijkstra function: dijkstra2","user":{"login":"mbhulin","id":11388778,"avatar_url":"https://avatars.githubusercontent.com/u/11388778?v=3","gravatar_id":"","url":"https://api.github.com/users/mbhulin","html_url":"https://github.com/mbhulin","followers_url":"https://api.github.com/users/mbhulin/followers","following_url":"https://api.github.com/users/mbhulin/following{/other_user}","gists_url":"https://api.github.com/users/mbhulin/gists{/gist_id}","starred_url":"https://api.github.com/users/mbhulin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbhulin/subscriptions","organizations_url":"https://api.github.com/users/mbhulin/orgs","repos_url":"https://api.github.com/users/mbhulin/repos","events_url":"https://api.github.com/users/mbhulin/events{/privacy}","received_events_url":"https://api.github.com/users/mbhulin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"luigidellaquila","id":459289,"avatar_url":"https://avatars.githubusercontent.com/u/459289?v=3","gravatar_id":"","url":"https://api.github.com/users/luigidellaquila","html_url":"https://github.com/luigidellaquila","followers_url":"https://api.github.com/users/luigidellaquila/followers","following_url":"https://api.github.com/users/luigidellaquila/following{/other_user}","gists_url":"https://api.github.com/users/luigidellaquila/gists{/gist_id}","starred_url":"https://api.github.com/users/luigidellaquila/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luigidellaquila/subscriptions","organizations_url":"https://api.github.com/users/luigidellaquila/orgs","repos_url":"https://api.github.com/users/luigidellaquila/repos","events_url":"https://api.github.com/users/luigidellaquila/events{/privacy}","received_events_url":"https://api.github.com/users/luigidellaquila/received_events","type":"User","site_admin":false},"milestone":null,"comments":7,"created_at":"2015-07-31T09:31:53Z","updated_at":"2015-09-11T08:14:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/orientechnologies/orientdb/pulls/4694","html_url":"https://github.com/orientechnologies/orientdb/pull/4694","diff_url":"https://github.com/orientechnologies/orientdb/pull/4694.diff","patch_url":"https://github.com/orientechnologies/orientdb/pull/4694.patch"},"body":"As discussed in issue #4497 dijkstra2 is a copy of the original dijkstra function with the following changes:\r\n* dijkstra2 has 4 or 5 parameters, dijkstra has 3 or 4 parameters \r\n* The third parameter is the edge type i. e. the subclass of E considered for routing. Other edges are neglected in dijkstra2.\r\n* The fourth parameter is the name of the property that represents the 'weight' or 'cost'. In the original dijkstra function this is the third parameter.\r\n* The optional direction parameter is the fifth parameter in dijkstra2 but the fourth parameter in dijkstra.\r\n* If an edge has no weight field or the weight field is null this edge is not considered for routing, becouse the weight is set to Float.MAX_VALUE. In contrast the original dijkstra function sets the weight to zero in this case.\r\n* If source and destination coincide return a path with only one vertex regardless whether a self-loop exists. This feature of dijkstra2 can be discussed: On one hand in a routing task if source and destination are the same you can reach the destination without effort. On the other hand there is no path with edges from source to destination.\r\n\r\nThere is also a new JUnit test OSQLFunctionDijkstraTest2 for the dijkstra2 function copied from OSQLFunctionDijkstraTest with additional test cases. All tests succeed."},"comment":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/comments/139480304","html_url":"https://github.com/orientechnologies/orientdb/pull/4694#issuecomment-139480304","issue_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4694","id":139480304,"user":{"login":"mbhulin","id":11388778,"avatar_url":"https://avatars.githubusercontent.com/u/11388778?v=3","gravatar_id":"","url":"https://api.github.com/users/mbhulin","html_url":"https://github.com/mbhulin","followers_url":"https://api.github.com/users/mbhulin/followers","following_url":"https://api.github.com/users/mbhulin/following{/other_user}","gists_url":"https://api.github.com/users/mbhulin/gists{/gist_id}","starred_url":"https://api.github.com/users/mbhulin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbhulin/subscriptions","organizations_url":"https://api.github.com/users/mbhulin/orgs","repos_url":"https://api.github.com/users/mbhulin/repos","events_url":"https://api.github.com/users/mbhulin/events{/privacy}","received_events_url":"https://api.github.com/users/mbhulin/received_events","type":"User","site_admin":false},"created_at":"2015-09-11T08:14:08Z","updated_at":"2015-09-11T08:14:08Z","body":"@luigidellaquila In issue #4946 Luca suggested to reimplement the dijkstra function to increase performance. If you do that, you could consider the discussion above. Or shall I try to implement a new version of the dijkstra function based on the actual implementation of shortest path?"}}