{"action":"created","comment":{"url":"https://api.github.com/repos/mapsme/omim/pulls/comments/121113225","pull_request_review_id":43139437,"id":121113225,"diff_hunk":"@@ -61,10 +61,55 @@ class AStarAlgorithm\n \n   using TOnVisitedVertexCallback = std::function<void(TVertexType const &, TVertexType const &)>;\n \n-  template <typename CheckForStop, typename AdjustEdgeWeight, typename PutToParents>\n+  class Context final\n+  {\n+  public:\n+    void Clear()\n+    {\n+      m_distanceMap.clear();\n+      m_parents.clear();\n+    }\n+\n+    bool HasDistance(TVertexType const & vertex) const\n+    {\n+      return m_distanceMap.find(vertex) != m_distanceMap.cend();\n+    }\n+\n+    double GetDistance(TVertexType const & vertex) const\n+    {\n+      auto const & it = m_distanceMap.find(vertex);\n+      if (it == m_distanceMap.cend())\n+        return std::numeric_limits<double>::max();\n+      return it->second;\n+    }\n+\n+    void SetDistance(TVertexType const & vertex, double distance)\n+    {\n+      m_distanceMap[vertex] = distance;\n+    }\n+\n+    void PutParent(TVertexType const & parent, TVertexType const & child)\n+    {\n+      m_parents[parent] = child;\n+    }\n+\n+    void ReconstructPath(TVertexType const & v, vector<TVertexType> & path) const;","path":"routing/base/astar_algorithm.hpp","position":37,"original_position":37,"commit_id":"09b2f903e38a5e82a9d9e011dab8b79fd0a6737a","original_commit_id":"09b2f903e38a5e82a9d9e011dab8b79fd0a6737a","user":{"login":"bykoianko","id":1768114,"avatar_url":"https://avatars3.githubusercontent.com/u/1768114?v=3","gravatar_id":"","url":"https://api.github.com/users/bykoianko","html_url":"https://github.com/bykoianko","followers_url":"https://api.github.com/users/bykoianko/followers","following_url":"https://api.github.com/users/bykoianko/following{/other_user}","gists_url":"https://api.github.com/users/bykoianko/gists{/gist_id}","starred_url":"https://api.github.com/users/bykoianko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bykoianko/subscriptions","organizations_url":"https://api.github.com/users/bykoianko/orgs","repos_url":"https://api.github.com/users/bykoianko/repos","events_url":"https://api.github.com/users/bykoianko/events{/privacy}","received_events_url":"https://api.github.com/users/bykoianko/received_events","type":"User","site_admin":false},"body":"std::vector?","created_at":"2017-06-09T12:24:48Z","updated_at":"2017-06-09T12:24:48Z","html_url":"https://github.com/mapsme/omim/pull/6176#discussion_r121113225","pull_request_url":"https://api.github.com/repos/mapsme/omim/pulls/6176","_links":{"self":{"href":"https://api.github.com/repos/mapsme/omim/pulls/comments/121113225"},"html":{"href":"https://github.com/mapsme/omim/pull/6176#discussion_r121113225"},"pull_request":{"href":"https://api.github.com/repos/mapsme/omim/pulls/6176"}}},"pull_request":{"url":"https://api.github.com/repos/mapsme/omim/pulls/6176","id":123501007,"html_url":"https://github.com/mapsme/omim/pull/6176","diff_url":"https://github.com/mapsme/omim/pull/6176.diff","patch_url":"https://github.com/mapsme/omim/pull/6176.patch","issue_url":"https://api.github.com/repos/mapsme/omim/issues/6176","number":6176,"state":"open","locked":false,"title":"[routing] Fast rebuild route","user":{"login":"dobriy-eeh","id":19839790,"avatar_url":"https://avatars1.githubusercontent.com/u/19839790?v=3","gravatar_id":"","url":"https://api.github.com/users/dobriy-eeh","html_url":"https://github.com/dobriy-eeh","followers_url":"https://api.github.com/users/dobriy-eeh/followers","following_url":"https://api.github.com/users/dobriy-eeh/following{/other_user}","gists_url":"https://api.github.com/users/dobriy-eeh/gists{/gist_id}","starred_url":"https://api.github.com/users/dobriy-eeh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dobriy-eeh/subscriptions","organizations_url":"https://api.github.com/users/dobriy-eeh/orgs","repos_url":"https://api.github.com/users/dobriy-eeh/repos","events_url":"https://api.github.com/users/dobriy-eeh/events{/privacy}","received_events_url":"https://api.github.com/users/dobriy-eeh/received_events","type":"User","site_admin":false},"body":"Быстрая перепрокладка маршрута.\r\n\r\nПри уходе с маршрута он не пересчитывается с нуля, а ищет возврат на проложенный.\r\nhttps://jira.mail.ru/browse/MAPSME-4535","created_at":"2017-06-01T13:37:54Z","updated_at":"2017-06-09T12:24:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"db8eeb89c3fab1398592065823f9dfac4cd03e64","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/mapsme/omim/pulls/6176/commits","review_comments_url":"https://api.github.com/repos/mapsme/omim/pulls/6176/comments","review_comment_url":"https://api.github.com/repos/mapsme/omim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mapsme/omim/issues/6176/comments","statuses_url":"https://api.github.com/repos/mapsme/omim/statuses/09b2f903e38a5e82a9d9e011dab8b79fd0a6737a","head":{"label":"dobriy-eeh:fast-rebuild-route","ref":"fast-rebuild-route","sha":"09b2f903e38a5e82a9d9e011dab8b79fd0a6737a","user":{"login":"dobriy-eeh","id":19839790,"avatar_url":"https://avatars1.githubusercontent.com/u/19839790?v=3","gravatar_id":"","url":"https://api.github.com/users/dobriy-eeh","html_url":"https://github.com/dobriy-eeh","followers_url":"https://api.github.com/users/dobriy-eeh/followers","following_url":"https://api.github.com/users/dobriy-eeh/following{/other_user}","gists_url":"https://api.github.com/users/dobriy-eeh/gists{/gist_id}","starred_url":"https://api.github.com/users/dobriy-eeh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dobriy-eeh/subscriptions","organizations_url":"https://api.github.com/users/dobriy-eeh/orgs","repos_url":"https://api.github.com/users/dobriy-eeh/repos","events_url":"https://api.github.com/users/dobriy-eeh/events{/privacy}","received_events_url":"https://api.github.com/users/dobriy-eeh/received_events","type":"User","site_admin":false},"repo":{"id":69439216,"name":"omim","full_name":"dobriy-eeh/omim","owner":{"login":"dobriy-eeh","id":19839790,"avatar_url":"https://avatars1.githubusercontent.com/u/19839790?v=3","gravatar_id":"","url":"https://api.github.com/users/dobriy-eeh","html_url":"https://github.com/dobriy-eeh","followers_url":"https://api.github.com/users/dobriy-eeh/followers","following_url":"https://api.github.com/users/dobriy-eeh/following{/other_user}","gists_url":"https://api.github.com/users/dobriy-eeh/gists{/gist_id}","starred_url":"https://api.github.com/users/dobriy-eeh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dobriy-eeh/subscriptions","organizations_url":"https://api.github.com/users/dobriy-eeh/orgs","repos_url":"https://api.github.com/users/dobriy-eeh/repos","events_url":"https://api.github.com/users/dobriy-eeh/events{/privacy}","received_events_url":"https://api.github.com/users/dobriy-eeh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dobriy-eeh/omim","description":"MAPS.ME - Offline OpenStreetMap maps for iOS/Android/Mac/Linux/Windows","fork":true,"url":"https://api.github.com/repos/dobriy-eeh/omim","forks_url":"https://api.github.com/repos/dobriy-eeh/omim/forks","keys_url":"https://api.github.com/repos/dobriy-eeh/omim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dobriy-eeh/omim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dobriy-eeh/omim/teams","hooks_url":"https://api.github.com/repos/dobriy-eeh/omim/hooks","issue_events_url":"https://api.github.com/repos/dobriy-eeh/omim/issues/events{/number}","events_url":"https://api.github.com/repos/dobriy-eeh/omim/events","assignees_url":"https://api.github.com/repos/dobriy-eeh/omim/assignees{/user}","branches_url":"https://api.github.com/repos/dobriy-eeh/omim/branches{/branch}","tags_url":"https://api.github.com/repos/dobriy-eeh/omim/tags","blobs_url":"https://api.github.com/repos/dobriy-eeh/omim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dobriy-eeh/omim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dobriy-eeh/omim/git/refs{/sha}","trees_url":"https://api.github.com/repos/dobriy-eeh/omim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dobriy-eeh/omim/statuses/{sha}","languages_url":"https://api.github.com/repos/dobriy-eeh/omim/languages","stargazers_url":"https://api.github.com/repos/dobriy-eeh/omim/stargazers","contributors_url":"https://api.github.com/repos/dobriy-eeh/omim/contributors","subscribers_url":"https://api.github.com/repos/dobriy-eeh/omim/subscribers","subscription_url":"https://api.github.com/repos/dobriy-eeh/omim/subscription","commits_url":"https://api.github.com/repos/dobriy-eeh/omim/commits{/sha}","git_commits_url":"https://api.github.com/repos/dobriy-eeh/omim/git/commits{/sha}","comments_url":"https://api.github.com/repos/dobriy-eeh/omim/comments{/number}","issue_comment_url":"https://api.github.com/repos/dobriy-eeh/omim/issues/comments{/number}","contents_url":"https://api.github.com/repos/dobriy-eeh/omim/contents/{+path}","compare_url":"https://api.github.com/repos/dobriy-eeh/omim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dobriy-eeh/omim/merges","archive_url":"https://api.github.com/repos/dobriy-eeh/omim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dobriy-eeh/omim/downloads","issues_url":"https://api.github.com/repos/dobriy-eeh/omim/issues{/number}","pulls_url":"https://api.github.com/repos/dobriy-eeh/omim/pulls{/number}","milestones_url":"https://api.github.com/repos/dobriy-eeh/omim/milestones{/number}","notifications_url":"https://api.github.com/repos/dobriy-eeh/omim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dobriy-eeh/omim/labels{/name}","releases_url":"https://api.github.com/repos/dobriy-eeh/omim/releases{/id}","deployments_url":"https://api.github.com/repos/dobriy-eeh/omim/deployments","created_at":"2016-09-28T07:49:37Z","updated_at":"2016-09-28T07:51:12Z","pushed_at":"2017-06-08T16:32:06Z","git_url":"git://github.com/dobriy-eeh/omim.git","ssh_url":"git@github.com:dobriy-eeh/omim.git","clone_url":"https://github.com/dobriy-eeh/omim.git","svn_url":"https://github.com/dobriy-eeh/omim","homepage":null,"size":3108191,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mapsme:master","ref":"master","sha":"6b930914b8df1ebac3bbee72f8f6f371d5bc4121","user":{"login":"mapsme","id":14185141,"avatar_url":"https://avatars2.githubusercontent.com/u/14185141?v=3","gravatar_id":"","url":"https://api.github.com/users/mapsme","html_url":"https://github.com/mapsme","followers_url":"https://api.github.com/users/mapsme/followers","following_url":"https://api.github.com/users/mapsme/following{/other_user}","gists_url":"https://api.github.com/users/mapsme/gists{/gist_id}","starred_url":"https://api.github.com/users/mapsme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapsme/subscriptions","organizations_url":"https://api.github.com/users/mapsme/orgs","repos_url":"https://api.github.com/users/mapsme/repos","events_url":"https://api.github.com/users/mapsme/events{/privacy}","received_events_url":"https://api.github.com/users/mapsme/received_events","type":"Organization","site_admin":false},"repo":{"id":42798033,"name":"omim","full_name":"mapsme/omim","owner":{"login":"mapsme","id":14185141,"avatar_url":"https://avatars2.githubusercontent.com/u/14185141?v=3","gravatar_id":"","url":"https://api.github.com/users/mapsme","html_url":"https://github.com/mapsme","followers_url":"https://api.github.com/users/mapsme/followers","following_url":"https://api.github.com/users/mapsme/following{/other_user}","gists_url":"https://api.github.com/users/mapsme/gists{/gist_id}","starred_url":"https://api.github.com/users/mapsme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapsme/subscriptions","organizations_url":"https://api.github.com/users/mapsme/orgs","repos_url":"https://api.github.com/users/mapsme/repos","events_url":"https://api.github.com/users/mapsme/events{/privacy}","received_events_url":"https://api.github.com/users/mapsme/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mapsme/omim","description":"🗺️ MAPS.ME — Offline OpenStreetMap maps for iOS and Android","fork":false,"url":"https://api.github.com/repos/mapsme/omim","forks_url":"https://api.github.com/repos/mapsme/omim/forks","keys_url":"https://api.github.com/repos/mapsme/omim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapsme/omim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapsme/omim/teams","hooks_url":"https://api.github.com/repos/mapsme/omim/hooks","issue_events_url":"https://api.github.com/repos/mapsme/omim/issues/events{/number}","events_url":"https://api.github.com/repos/mapsme/omim/events","assignees_url":"https://api.github.com/repos/mapsme/omim/assignees{/user}","branches_url":"https://api.github.com/repos/mapsme/omim/branches{/branch}","tags_url":"https://api.github.com/repos/mapsme/omim/tags","blobs_url":"https://api.github.com/repos/mapsme/omim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapsme/omim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapsme/omim/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapsme/omim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapsme/omim/statuses/{sha}","languages_url":"https://api.github.com/repos/mapsme/omim/languages","stargazers_url":"https://api.github.com/repos/mapsme/omim/stargazers","contributors_url":"https://api.github.com/repos/mapsme/omim/contributors","subscribers_url":"https://api.github.com/repos/mapsme/omim/subscribers","subscription_url":"https://api.github.com/repos/mapsme/omim/subscription","commits_url":"https://api.github.com/repos/mapsme/omim/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapsme/omim/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapsme/omim/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapsme/omim/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapsme/omim/contents/{+path}","compare_url":"https://api.github.com/repos/mapsme/omim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapsme/omim/merges","archive_url":"https://api.github.com/repos/mapsme/omim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapsme/omim/downloads","issues_url":"https://api.github.com/repos/mapsme/omim/issues{/number}","pulls_url":"https://api.github.com/repos/mapsme/omim/pulls{/number}","milestones_url":"https://api.github.com/repos/mapsme/omim/milestones{/number}","notifications_url":"https://api.github.com/repos/mapsme/omim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapsme/omim/labels{/name}","releases_url":"https://api.github.com/repos/mapsme/omim/releases{/id}","deployments_url":"https://api.github.com/repos/mapsme/omim/deployments","created_at":"2015-09-20T02:57:13Z","updated_at":"2017-06-09T05:17:47Z","pushed_at":"2017-06-09T12:21:18Z","git_url":"git://github.com/mapsme/omim.git","ssh_url":"git@github.com:mapsme/omim.git","clone_url":"https://github.com/mapsme/omim.git","svn_url":"https://github.com/mapsme/omim","homepage":"","size":3195287,"stargazers_count":2275,"watchers_count":2275,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":467,"mirror_url":null,"open_issues_count":500,"forks":467,"open_issues":500,"watchers":2275,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mapsme/omim/pulls/6176"},"html":{"href":"https://github.com/mapsme/omim/pull/6176"},"issue":{"href":"https://api.github.com/repos/mapsme/omim/issues/6176"},"comments":{"href":"https://api.github.com/repos/mapsme/omim/issues/6176/comments"},"review_comments":{"href":"https://api.github.com/repos/mapsme/omim/pulls/6176/comments"},"review_comment":{"href":"https://api.github.com/repos/mapsme/omim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mapsme/omim/pulls/6176/commits"},"statuses":{"href":"https://api.github.com/repos/mapsme/omim/statuses/09b2f903e38a5e82a9d9e011dab8b79fd0a6737a"}}}}
{"actor":{"display_login":"bykoianko"}}