{"action":"created","comment":{"url":"https://api.github.com/repos/EDA-group-cchn/rstartree/pulls/comments/28936324","id":28936324,"diff_hunk":"@@ -260,5 +261,55 @@ typename RStarTree<T>::Node *RStarTree<T>::FindLeaf(\n     return nullptr;\n   }\n }\n+template<typename T>\n+void RStarTree<T>::CondenseTree(Node *node)\n+{\n+  Node *tmp,*parent;\n+  tmp = node;\n+  std::queue<Entry> q;\n+  Entry en;\n+  while(tmp != root_){\n+    parent = tmp->parent_;\n+    if(tmp->children_.size()<min_node_size_){\n+      typename VEntry::iterator it = FindEntry(parent->children_,node);\n+      parent->children_.erase(*it);\n+      for(Entry &entry : tmp->children_)\n+        q.push(entry);\n+    }\n+    else{\n+      while(tmp != root_){\n+        BuildBoundingBox(tmp->children_);\n+        tmp = parent;\n+      }\n+    }\n+  }\n+  tmp = parent;\n+  CondenseTree(tmp);\n+  /*while(!q.empty()){\n+    insertEntry(en.front(),0);\n+  }*/\n+\n+}\n+template<typename T>\n+void RStarTree<T>::Delete(const BoundingBox &bounding_box, RecordType record)\n+{\n+  Node *tmp;\n+  tmp = FindLeaf(bounding_box,record,root_);\n+  if(!tmp)\n+  {\n+    for (typename VEntry::iterator it = tmp->chidren_.begin(); it!=tmp->children_.end(); ++it)\n+    {\n+      if (bounding_box == it->first and\n+          record == *static_cast<RecordType *>(it->second))\n+        tmp->children_.erase(*it);\n+    }\n+    CondenseTree(tmp);\n+  }\n+  if(tmp->children_.size==1)\n+  {\n+    root_ = tmp->children_;","path":"src/rstartree.h","position":58,"original_position":58,"commit_id":"0e807eb0a6510a3b02a85ff30219bbc24665a1a8","original_commit_id":"0e807eb0a6510a3b02a85ff30219bbc24665a1a8","user":{"login":"aculquicondor","id":11529437,"avatar_url":"https://avatars.githubusercontent.com/u/11529437?v=3","gravatar_id":"","url":"https://api.github.com/users/aculquicondor","html_url":"https://github.com/aculquicondor","followers_url":"https://api.github.com/users/aculquicondor/followers","following_url":"https://api.github.com/users/aculquicondor/following{/other_user}","gists_url":"https://api.github.com/users/aculquicondor/gists{/gist_id}","starred_url":"https://api.github.com/users/aculquicondor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aculquicondor/subscriptions","organizations_url":"https://api.github.com/users/aculquicondor/orgs","repos_url":"https://api.github.com/users/aculquicondor/repos","events_url":"https://api.github.com/users/aculquicondor/events{/privacy}","received_events_url":"https://api.github.com/users/aculquicondor/received_events","type":"User","site_admin":false},"body":"`children_[0]` además, falta hacer delete a `root_` viejo","created_at":"2015-04-23T04:45:49Z","updated_at":"2015-04-23T04:45:49Z","html_url":"https://github.com/EDA-group-cchn/rstartree/pull/27#discussion_r28936324","pull_request_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/pulls/27","_links":{"self":{"href":"https://api.github.com/repos/EDA-group-cchn/rstartree/pulls/comments/28936324"},"html":{"href":"https://github.com/EDA-group-cchn/rstartree/pull/27#discussion_r28936324"},"pull_request":{"href":"https://api.github.com/repos/EDA-group-cchn/rstartree/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/EDA-group-cchn/rstartree/pulls/27","id":33919116,"html_url":"https://github.com/EDA-group-cchn/rstartree/pull/27","diff_url":"https://github.com/EDA-group-cchn/rstartree/pull/27.diff","patch_url":"https://github.com/EDA-group-cchn/rstartree/pull/27.patch","issue_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/issues/27","number":27,"state":"open","locked":false,"title":"Condense tree & delete","user":{"login":"aculquicondor","id":11529437,"avatar_url":"https://avatars.githubusercontent.com/u/11529437?v=3","gravatar_id":"","url":"https://api.github.com/users/aculquicondor","html_url":"https://github.com/aculquicondor","followers_url":"https://api.github.com/users/aculquicondor/followers","following_url":"https://api.github.com/users/aculquicondor/following{/other_user}","gists_url":"https://api.github.com/users/aculquicondor/gists{/gist_id}","starred_url":"https://api.github.com/users/aculquicondor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aculquicondor/subscriptions","organizations_url":"https://api.github.com/users/aculquicondor/orgs","repos_url":"https://api.github.com/users/aculquicondor/repos","events_url":"https://api.github.com/users/aculquicondor/events{/privacy}","received_events_url":"https://api.github.com/users/aculquicondor/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-04-23T02:25:49Z","updated_at":"2015-04-23T04:45:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"537a8742d96afc16c69263cc550f1607cf1d7d6f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/pulls/27/commits","review_comments_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/pulls/27/comments","review_comment_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/pulls/comments{/number}","comments_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/issues/27/comments","statuses_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/statuses/0e807eb0a6510a3b02a85ff30219bbc24665a1a8","head":{"label":"EDA-group-cchn:condenseTree-Delete","ref":"condenseTree-Delete","sha":"0e807eb0a6510a3b02a85ff30219bbc24665a1a8","user":{"login":"EDA-group-cchn","id":11708109,"avatar_url":"https://avatars.githubusercontent.com/u/11708109?v=3","gravatar_id":"","url":"https://api.github.com/users/EDA-group-cchn","html_url":"https://github.com/EDA-group-cchn","followers_url":"https://api.github.com/users/EDA-group-cchn/followers","following_url":"https://api.github.com/users/EDA-group-cchn/following{/other_user}","gists_url":"https://api.github.com/users/EDA-group-cchn/gists{/gist_id}","starred_url":"https://api.github.com/users/EDA-group-cchn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EDA-group-cchn/subscriptions","organizations_url":"https://api.github.com/users/EDA-group-cchn/orgs","repos_url":"https://api.github.com/users/EDA-group-cchn/repos","events_url":"https://api.github.com/users/EDA-group-cchn/events{/privacy}","received_events_url":"https://api.github.com/users/EDA-group-cchn/received_events","type":"Organization","site_admin":false},"repo":{"id":33102646,"name":"rstartree","full_name":"EDA-group-cchn/rstartree","owner":{"login":"EDA-group-cchn","id":11708109,"avatar_url":"https://avatars.githubusercontent.com/u/11708109?v=3","gravatar_id":"","url":"https://api.github.com/users/EDA-group-cchn","html_url":"https://github.com/EDA-group-cchn","followers_url":"https://api.github.com/users/EDA-group-cchn/followers","following_url":"https://api.github.com/users/EDA-group-cchn/following{/other_user}","gists_url":"https://api.github.com/users/EDA-group-cchn/gists{/gist_id}","starred_url":"https://api.github.com/users/EDA-group-cchn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EDA-group-cchn/subscriptions","organizations_url":"https://api.github.com/users/EDA-group-cchn/orgs","repos_url":"https://api.github.com/users/EDA-group-cchn/repos","events_url":"https://api.github.com/users/EDA-group-cchn/events{/privacy}","received_events_url":"https://api.github.com/users/EDA-group-cchn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/EDA-group-cchn/rstartree","description":"","fork":false,"url":"https://api.github.com/repos/EDA-group-cchn/rstartree","forks_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/forks","keys_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/teams","hooks_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/hooks","issue_events_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/issues/events{/number}","events_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/events","assignees_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/assignees{/user}","branches_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/branches{/branch}","tags_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/tags","blobs_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/git/refs{/sha}","trees_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/statuses/{sha}","languages_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/languages","stargazers_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/stargazers","contributors_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/contributors","subscribers_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/subscribers","subscription_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/subscription","commits_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/commits{/sha}","git_commits_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/git/commits{/sha}","comments_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/comments{/number}","issue_comment_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/issues/comments{/number}","contents_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/contents/{+path}","compare_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/merges","archive_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/downloads","issues_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/issues{/number}","pulls_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/pulls{/number}","milestones_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/milestones{/number}","notifications_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/labels{/name}","releases_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/releases{/id}","created_at":"2015-03-30T04:09:08Z","updated_at":"2015-04-19T22:44:12Z","pushed_at":"2015-04-23T04:37:08Z","git_url":"git://github.com/EDA-group-cchn/rstartree.git","ssh_url":"git@github.com:EDA-group-cchn/rstartree.git","clone_url":"https://github.com/EDA-group-cchn/rstartree.git","svn_url":"https://github.com/EDA-group-cchn/rstartree","homepage":null,"size":486,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":5,"forks":1,"open_issues":5,"watchers":0,"default_branch":"master"}},"base":{"label":"EDA-group-cchn:master","ref":"master","sha":"047e6e28185b01478c67ec7b748bcec748e6253a","user":{"login":"EDA-group-cchn","id":11708109,"avatar_url":"https://avatars.githubusercontent.com/u/11708109?v=3","gravatar_id":"","url":"https://api.github.com/users/EDA-group-cchn","html_url":"https://github.com/EDA-group-cchn","followers_url":"https://api.github.com/users/EDA-group-cchn/followers","following_url":"https://api.github.com/users/EDA-group-cchn/following{/other_user}","gists_url":"https://api.github.com/users/EDA-group-cchn/gists{/gist_id}","starred_url":"https://api.github.com/users/EDA-group-cchn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EDA-group-cchn/subscriptions","organizations_url":"https://api.github.com/users/EDA-group-cchn/orgs","repos_url":"https://api.github.com/users/EDA-group-cchn/repos","events_url":"https://api.github.com/users/EDA-group-cchn/events{/privacy}","received_events_url":"https://api.github.com/users/EDA-group-cchn/received_events","type":"Organization","site_admin":false},"repo":{"id":33102646,"name":"rstartree","full_name":"EDA-group-cchn/rstartree","owner":{"login":"EDA-group-cchn","id":11708109,"avatar_url":"https://avatars.githubusercontent.com/u/11708109?v=3","gravatar_id":"","url":"https://api.github.com/users/EDA-group-cchn","html_url":"https://github.com/EDA-group-cchn","followers_url":"https://api.github.com/users/EDA-group-cchn/followers","following_url":"https://api.github.com/users/EDA-group-cchn/following{/other_user}","gists_url":"https://api.github.com/users/EDA-group-cchn/gists{/gist_id}","starred_url":"https://api.github.com/users/EDA-group-cchn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EDA-group-cchn/subscriptions","organizations_url":"https://api.github.com/users/EDA-group-cchn/orgs","repos_url":"https://api.github.com/users/EDA-group-cchn/repos","events_url":"https://api.github.com/users/EDA-group-cchn/events{/privacy}","received_events_url":"https://api.github.com/users/EDA-group-cchn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/EDA-group-cchn/rstartree","description":"","fork":false,"url":"https://api.github.com/repos/EDA-group-cchn/rstartree","forks_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/forks","keys_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/teams","hooks_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/hooks","issue_events_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/issues/events{/number}","events_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/events","assignees_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/assignees{/user}","branches_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/branches{/branch}","tags_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/tags","blobs_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/git/refs{/sha}","trees_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/statuses/{sha}","languages_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/languages","stargazers_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/stargazers","contributors_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/contributors","subscribers_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/subscribers","subscription_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/subscription","commits_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/commits{/sha}","git_commits_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/git/commits{/sha}","comments_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/comments{/number}","issue_comment_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/issues/comments{/number}","contents_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/contents/{+path}","compare_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/merges","archive_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/downloads","issues_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/issues{/number}","pulls_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/pulls{/number}","milestones_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/milestones{/number}","notifications_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/labels{/name}","releases_url":"https://api.github.com/repos/EDA-group-cchn/rstartree/releases{/id}","created_at":"2015-03-30T04:09:08Z","updated_at":"2015-04-19T22:44:12Z","pushed_at":"2015-04-23T04:37:08Z","git_url":"git://github.com/EDA-group-cchn/rstartree.git","ssh_url":"git@github.com:EDA-group-cchn/rstartree.git","clone_url":"https://github.com/EDA-group-cchn/rstartree.git","svn_url":"https://github.com/EDA-group-cchn/rstartree","homepage":null,"size":486,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":5,"forks":1,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/EDA-group-cchn/rstartree/pulls/27"},"html":{"href":"https://github.com/EDA-group-cchn/rstartree/pull/27"},"issue":{"href":"https://api.github.com/repos/EDA-group-cchn/rstartree/issues/27"},"comments":{"href":"https://api.github.com/repos/EDA-group-cchn/rstartree/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/EDA-group-cchn/rstartree/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/EDA-group-cchn/rstartree/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/EDA-group-cchn/rstartree/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/EDA-group-cchn/rstartree/statuses/0e807eb0a6510a3b02a85ff30219bbc24665a1a8"}}}}