{"action":"created","issue":{"url":"https://api.github.com/repos/jgrapht/jgrapht/issues/323","repository_url":"https://api.github.com/repos/jgrapht/jgrapht","labels_url":"https://api.github.com/repos/jgrapht/jgrapht/issues/323/labels{/name}","comments_url":"https://api.github.com/repos/jgrapht/jgrapht/issues/323/comments","events_url":"https://api.github.com/repos/jgrapht/jgrapht/issues/323/events","html_url":"https://github.com/jgrapht/jgrapht/pull/323","id":186466220,"number":323,"title":"Fix PathValidator to make its implementation feasible","user":{"login":"assimiz","id":2134809,"avatar_url":"https://avatars.githubusercontent.com/u/2134809?v=3","gravatar_id":"","url":"https://api.github.com/users/assimiz","html_url":"https://github.com/assimiz","followers_url":"https://api.github.com/users/assimiz/followers","following_url":"https://api.github.com/users/assimiz/following{/other_user}","gists_url":"https://api.github.com/users/assimiz/gists{/gist_id}","starred_url":"https://api.github.com/users/assimiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/assimiz/subscriptions","organizations_url":"https://api.github.com/users/assimiz/orgs","repos_url":"https://api.github.com/users/assimiz/repos","events_url":"https://api.github.com/users/assimiz/events{/privacy}","received_events_url":"https://api.github.com/users/assimiz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-11-01T06:10:21Z","updated_at":"2016-11-02T16:29:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jgrapht/jgrapht/pulls/323","html_url":"https://github.com/jgrapht/jgrapht/pull/323","diff_url":"https://github.com/jgrapht/jgrapht/pull/323.diff","patch_url":"https://github.com/jgrapht/jgrapht/pull/323.patch"},"body":"We previously provided an option to users of `KShortestPaths` to provide an external `PathValidator` (see PR #228). The problem is that `AbstractPathElement` which is a parameter of the `KShortestPaths#isValidPath` method, is invisible out of the `org.jgrapht.alg` package. Hence, users of `PathValidator` are unable to actually implement it.\r\n\r\nI have added a public `PathElement` interface on top of `AbstractPathElement`. It includes all the methods currently implemented by `AbstractPathElement`. By that we actually allow the implementation of `PathValidator` while uncompromising package visibility and encapsulation."},"comment":{"url":"https://api.github.com/repos/jgrapht/jgrapht/issues/comments/257919252","html_url":"https://github.com/jgrapht/jgrapht/pull/323#issuecomment-257919252","issue_url":"https://api.github.com/repos/jgrapht/jgrapht/issues/323","id":257919252,"user":{"login":"d-michail","id":15940875,"avatar_url":"https://avatars.githubusercontent.com/u/15940875?v=3","gravatar_id":"","url":"https://api.github.com/users/d-michail","html_url":"https://github.com/d-michail","followers_url":"https://api.github.com/users/d-michail/followers","following_url":"https://api.github.com/users/d-michail/following{/other_user}","gists_url":"https://api.github.com/users/d-michail/gists{/gist_id}","starred_url":"https://api.github.com/users/d-michail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d-michail/subscriptions","organizations_url":"https://api.github.com/users/d-michail/orgs","repos_url":"https://api.github.com/users/d-michail/repos","events_url":"https://api.github.com/users/d-michail/events{/privacy}","received_events_url":"https://api.github.com/users/d-michail/received_events","type":"User","site_admin":false},"created_at":"2016-11-02T16:29:42Z","updated_at":"2016-11-02T16:29:42Z","body":"Anyway, to keep moving forward, I think I am in favor of letting @jsichi and/or @jkinable decide on this one. \r\n\r\nMy preference is to have the interface use a `GraphPath` and then try to solve any implementation issues (see perfectly valid solution in previous comment) rather than introduce a new public interface which is a `Node` of a reverse linked list. \r\n\r\nHowever, if everyone thinks that the new interface is a good idea, it still needs a lot of work:\r\n - the proper location for such an interface would be inside the `PathValidator` interface (as inner) in order to not confuse users\r\n - the name needs change\r\n - a possible suggestion would be to contain methods like \r\n```\r\ngetLastVertex()\r\ngetLastEdge()\r\ngetGraphPath()\r\n``` \r\n  which is the functionality that you are describing but definitely not any methods which return the previous list node in order to do a while loop and traverse a list backwards.\r\n"}}
{"actor":{"display_login":"d-michail"}}