{"action":"created","comment":{"url":"https://api.github.com/repos/mapsme/omim/pulls/comments/88459985","pull_request_review_id":9032345,"id":88459985,"diff_hunk":"@@ -0,0 +1,84 @@\n+#pragma once\n+\n+#include \"routing/fseg.hpp\"\n+#include \"routing/fseg_index.hpp\"\n+#include \"routing/geometry.hpp\"\n+#include \"routing/joint.hpp\"\n+\n+#include \"coding/reader.hpp\"\n+#include \"coding/write_to_sink.hpp\"\n+\n+#include \"geometry/point2d.hpp\"\n+\n+#include \"std/cstdint.hpp\"\n+\n+namespace routing\n+{\n+class JointEdge final\n+{\n+public:\n+  JointEdge(JointId target, double weight) : target(target), weight(weight) {}\n+  JointId GetTarget() const { return target; }\n+  double GetWeight() const { return weight; }\n+private:\n+  JointId target;\n+  double weight;\n+};\n+\n+class IndexGraph final\n+{\n+public:\n+  using TVertexType = JointId;\n+  using TEdgeType = JointEdge;\n+\n+  IndexGraph() = default;\n+  explicit IndexGraph(unique_ptr<Geometry> geometry);\n+\n+  // TGraph overloads:\n+  void GetOutgoingEdgesList(TVertexType vertex, vector<TEdgeType> & edges) const;\n+  void GetIngoingEdgesList(TVertexType vertex, vector<TEdgeType> & edges) const;\n+  double HeuristicCostEstimate(TVertexType from, TVertexType to) const;\n+\n+  // Access methods.\n+  Geometry const & GetGeometry() const { return *m_geometry; }\n+  m2::PointD const & GetPoint(JointId jointId) const;\n+  size_t GetRoadsAmount() const { return m_fsegIndex.GetSize(); }","path":"routing/index_graph.hpp","position":null,"original_position":45,"commit_id":"7f739f2e0383461c0a353d989e519e63c46df837","original_commit_id":"33371fd298d031bfe9486d3760754fcc8bf98db8","user":{"login":"dobriy-eeh","id":19839790,"avatar_url":"https://avatars.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":"fixed","created_at":"2016-11-17T14:16:54Z","updated_at":"2016-11-17T14:16:54Z","html_url":"https://github.com/mapsme/omim/pull/4672#discussion_r88459985","pull_request_url":"https://api.github.com/repos/mapsme/omim/pulls/4672","_links":{"self":{"href":"https://api.github.com/repos/mapsme/omim/pulls/comments/88459985"},"html":{"href":"https://github.com/mapsme/omim/pull/4672#discussion_r88459985"},"pull_request":{"href":"https://api.github.com/repos/mapsme/omim/pulls/4672"}}},"pull_request":{"url":"https://api.github.com/repos/mapsme/omim/pulls/4672","id":92611491,"html_url":"https://github.com/mapsme/omim/pull/4672","diff_url":"https://github.com/mapsme/omim/pull/4672.diff","patch_url":"https://github.com/mapsme/omim/pull/4672.patch","issue_url":"https://api.github.com/repos/mapsme/omim/issues/4672","number":4672,"state":"open","locked":false,"title":"Indexed AStar routing","user":{"login":"dobriy-eeh","id":19839790,"avatar_url":"https://avatars.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":"AStar роутинг, базирующийся на специально подготовленной секции.\r\n\r\nВ секции хранится только топологическая информация: в каких feature id, segmend id пересекаются дороги. На основе этой топологии строится граф связности. Геометрия, которая необходима для вычисления длины рёбер и эвристики берётся из общего индекса.\r\n\r\nСборка новой секции выполняется по флажку generate_routing_index, который по умолчанию выключен. Поэтому новый роутинг изначально не будет влиять на работу приложения. При отсутствии секции будет работать старый OSRM роутинг.\r\n\r\nВ этот pull request не входят и будут сделаны позднее:\r\n1. Сжатие mwm секции. Сейчас она сериализуется наиболее простым способом и занимает 8mb для Москвы. Сжатие планируется сделать в ближайшем pull request.\r\n2. Различные оптимизации. Сейчас поиск от Планерной до Выхино на ipad занимает 5 секунд, это приемлемо.\r\n3. Поддержка пешеходного и велосипедного роутинга. В первую очередь мы планируем фокусироваться на автомобильном роутинге, поэтому некоторые вещи не учитываются, например, высоты.\r\n\r\nPTAL @bykoianko @ygorshenin @mpimenov ","created_at":"2016-11-07T16:05:59Z","updated_at":"2016-11-17T14:16:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"32a0461196102958891d7e0f5e1a503ac907e69b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mapsme/omim/pulls/4672/commits","review_comments_url":"https://api.github.com/repos/mapsme/omim/pulls/4672/comments","review_comment_url":"https://api.github.com/repos/mapsme/omim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mapsme/omim/issues/4672/comments","statuses_url":"https://api.github.com/repos/mapsme/omim/statuses/7f739f2e0383461c0a353d989e519e63c46df837","head":{"label":"dobriy-eeh:index-routing","ref":"index-routing","sha":"7f739f2e0383461c0a353d989e519e63c46df837","user":{"login":"dobriy-eeh","id":19839790,"avatar_url":"https://avatars.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://avatars.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":"2016-11-17T14:13:37Z","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":2816208,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"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":"9cb80242f86a3c72345d8b895e2089560c3fa182","user":{"login":"mapsme","id":14185141,"avatar_url":"https://avatars.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://avatars.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/Android/Mac/Linux/Windows","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":"2016-11-16T13:48:20Z","pushed_at":"2016-11-17T14:13:38Z","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":null,"size":2898866,"stargazers_count":2037,"watchers_count":2037,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":396,"mirror_url":null,"open_issues_count":358,"forks":396,"open_issues":358,"watchers":2037,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mapsme/omim/pulls/4672"},"html":{"href":"https://github.com/mapsme/omim/pull/4672"},"issue":{"href":"https://api.github.com/repos/mapsme/omim/issues/4672"},"comments":{"href":"https://api.github.com/repos/mapsme/omim/issues/4672/comments"},"review_comments":{"href":"https://api.github.com/repos/mapsme/omim/pulls/4672/comments"},"review_comment":{"href":"https://api.github.com/repos/mapsme/omim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mapsme/omim/pulls/4672/commits"},"statuses":{"href":"https://api.github.com/repos/mapsme/omim/statuses/7f739f2e0383461c0a353d989e519e63c46df837"}}}}
{"actor":{"display_login":"dobriy-eeh"}}