{"id":17153372,"url":"https://github.com/generall/vptree","last_synced_at":"2025-06-11T03:36:21.524Z","repository":{"id":56897662,"uuid":"48618391","full_name":"generall/vptree","owner":"generall","description":"VP-tree implementation in ruby","archived":false,"fork":false,"pushed_at":"2016-02-11T19:18:05.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-10T07:56:10.272Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/generall.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-26T17:29:11.000Z","updated_at":"2016-02-06T18:20:25.000Z","dependencies_parsed_at":"2022-08-21T02:20:23.508Z","dependency_job_id":null,"html_url":"https://github.com/generall/vptree","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generall%2Fvptree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generall%2Fvptree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generall%2Fvptree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generall%2Fvptree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/generall","download_url":"https://codeload.github.com/generall/vptree/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generall%2Fvptree/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259192182,"owners_count":22819431,"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":[],"created_at":"2024-10-14T21:46:02.505Z","updated_at":"2025-06-11T03:36:21.499Z","avatar_url":"https://github.com/generall.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vptree\n\n[![Build Status](https://travis-ci.org/generall/vptree.svg)](https://travis-ci.org/generall/vptree)\n\nImplementation of VP-tree (https://en.wikipedia.org/wiki/Vantage-point_tree) for fast kNN search with any measure function.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'vptree'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install vptree\n\n## Usage\n\n\nBuilding tree:\n\n```ruby\ndata = [[1,2], [2,1] , [2,2]]\n# any measure, satisfies the triangle inequality, is allowed\n# and may be passed as block\ntree = Vptree::VPTree.new(data) # data - array of vectors of objects with special mixin, see https://github.com/generall/Distance-Measures\n```\nQuering tree:\n\n```ruby\nnearest = tree.find_k_nearest([3,3], 1)\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/generall/vptree. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenerall%2Fvptree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgenerall%2Fvptree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenerall%2Fvptree/lists"}