{"id":22140809,"url":"https://github.com/xorz57/kdtree","last_synced_at":"2025-03-24T11:18:34.307Z","repository":{"id":180915046,"uuid":"665910221","full_name":"xorz57/KDTree","owner":"xorz57","description":"KDTree written in Scala","archived":false,"fork":false,"pushed_at":"2024-01-24T19:58:50.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-01-24T20:31:08.739Z","etag":null,"topics":["data-structures","kd-tree","kdtree","scala","scala-datastructures"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xorz57.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":"xorz57","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"custom":null}},"created_at":"2023-07-13T09:17:18.000Z","updated_at":"2024-04-23T12:41:35.576Z","dependencies_parsed_at":"2023-07-13T10:39:55.180Z","dependency_job_id":"f4c8eb80-3a5e-4d93-a1ec-057ef9583da0","html_url":"https://github.com/xorz57/KDTree","commit_stats":null,"previous_names":["xorz57/kdtree"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xorz57%2FKDTree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xorz57%2FKDTree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xorz57%2FKDTree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xorz57%2FKDTree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xorz57","download_url":"https://codeload.github.com/xorz57/KDTree/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245258214,"owners_count":20585977,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-structures","kd-tree","kdtree","scala","scala-datastructures"],"created_at":"2024-12-01T21:07:44.946Z","updated_at":"2025-03-24T11:18:34.271Z","avatar_url":"https://github.com/xorz57.png","language":"Scala","funding_links":["https://github.com/sponsors/xorz57"],"categories":[],"sub_categories":[],"readme":"# KDTree\n\n[![Scala CI](https://github.com/xorz57/KDTree/actions/workflows/scala.yml/badge.svg)](https://github.com/xorz57/KDTree/actions/workflows/scala.yml)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xorz57_KDTree\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=xorz57_KDTree)\n\n## Example\n\n```scala\nobject KDTreeSample {\n  def main(args: Array[String]): Unit = {\n    val points = Vector(\n      Vector(2.0, 3.0),\n      Vector(5.0, 4.0),\n      Vector(9.0, 6.0),\n      Vector(4.0, 7.0),\n      Vector(8.0, 1.0),\n      Vector(7.0, 2.0)\n    )\n\n    val tree = KDTree(points)\n\n    val result1 = tree.contains(Vector(2.0, 3.0))\n    val result2 = tree.range(Vector(3.0, 3.0), Vector(6.0, 8.0))\n    val result3 = tree.nearest(Vector(5.0, 6.0))\n    val result4 = tree.knn(Vector(5.0, 6.0), 3)\n\n    println(s\"result1: $result1\")\n    println(s\"result2: $result2\")\n    println(s\"result3: $result3\")\n    println(s\"result4: $result4\")\n  }\n}\n```\n\n## Output\n\n```console\nresult1: true\nresult2: Vector(Vector(4.0, 7.0), Vector(5.0, 4.0))\nresult3: (2.0,Vector(4.0, 7.0))\nresult4: Vector((2.0,Vector(4.0, 7.0)), (4.0,Vector(5.0, 4.0)), (16.0,Vector(9.0, 6.0)))\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxorz57%2Fkdtree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxorz57%2Fkdtree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxorz57%2Fkdtree/lists"}