{"id":15696822,"url":"https://github.com/rollczi/liteindex","last_synced_at":"2025-05-08T23:28:57.984Z","repository":{"id":103947147,"uuid":"568576365","full_name":"Rollczi/LiteIndex","owner":"Rollczi","description":"💜 LiteIndex - Fast library for indexing box/area in space by vectors/location/position.","archived":false,"fork":false,"pushed_at":"2025-05-03T03:44:30.000Z","size":143,"stargazers_count":10,"open_issues_count":10,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-03T04:29:26.625Z","etag":null,"topics":["java","optimization","optimization-algorithms"],"latest_commit_sha":null,"homepage":"","language":"Java","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/Rollczi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-11-20T23:56:06.000Z","updated_at":"2024-11-18T05:47:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"402f9733-17ed-4895-9c6c-b8caebceba79","html_url":"https://github.com/Rollczi/LiteIndex","commit_stats":{"total_commits":9,"total_committers":2,"mean_commits":4.5,"dds":"0.11111111111111116","last_synced_commit":"8572286172bbaa6a7e5c346f4b9733fb72d36c5e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rollczi%2FLiteIndex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rollczi%2FLiteIndex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rollczi%2FLiteIndex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rollczi%2FLiteIndex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rollczi","download_url":"https://codeload.github.com/Rollczi/LiteIndex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253162752,"owners_count":21863971,"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":["java","optimization","optimization-algorithms"],"created_at":"2024-10-03T19:10:02.839Z","updated_at":"2025-05-08T23:28:57.952Z","avatar_url":"https://github.com/Rollczi.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LiteIndex\n💜 LiteIndex - Fast and extensive library for indexing box/area in space by vectors/location/position based on hash indexing.\n\n### Simple Example\n```java\npublic class Main {\n    \n    public static void main(String[] args) {\n        int SPACE_SIZE = 10_000;\n        int AREA_SIZE = 80;\n        \n        // create index\n        SpaceIndex\u003cArea, Location\u003e index = SpaceIndex.\u003cArea, Location\u003ebuilder()\n            .axisX(location -\u003e location.getX())\n            .axisZ(location -\u003e location.getZ())\n            .axisY(location -\u003e location.getY())\n            .space(area -\u003e area.getMin(), area -\u003e area.getMax())\n            .indexing(IndexingAlgorithm.calculateOptimal(SPACE_SIZE, AREA_SIZE))\n            .concurrent(false)\n            .build();\n        \n        // put areas to index\n        index.put(new Area(new Location(0, 0, 0), new Location(10, 10, 10)));\n        index.put(new Area(new Location(3, 3, 3), new Location(7, 7, 7)));\n        index.put(new Area(new Location(5, 5, 5), new Location(15, 15, 15)));\n        \n        // fast search\n        List\u003cArea\u003e areas = index.get(new Location(5, 5, 5));\n    }\n}\n```\n\n**Variables:**\nIt's not limit, it's just for optimization and memory saving.\n- `MAP_SIZE` - expected maximum size of space\n- `AREA_SIZE` - expected maximum size of area\n\n**SpaceIndex builder**\n- `axisX` - function for getting **X** coordinate\n- `axisZ` - function for getting **Z** coordinate\n- `axisY` - function for getting **Y** coordinate\n- `space` - function for getting **min** and **max** location from area\n- `indexing` - set indexing algorithm (configure for **better performance**)\n- `concurrent` - set concurrent mode (if you want to use index in multiple threads)\n\n**SpaceIndex methods**\n- `put` - put area to index\n- `get` - get areas by location\n- `getAll` - get all areas from index\n- `getFirst` - get first area by location\n- `remove` - remove area from index\n- `removeAll` - remove all areas from index\n- `contains` - check if index contains area\n- `size` - get size of index\n\n**IndexingAlgorithm**\n- `calculateOptimal` - calculate optimal indexing algorithm for your space and area size\n- `chunk` - create indexing algorithm **(advanced)**\n\n### Gradle\n```kotlin\nrepositories {\n    maven(\"https://repo.eternalcode.pl/releases\")\n}\n```\n```kotlin\ndependencies {\n    implementation(\"dev.rollczi:liteindex:1.0.0\")\n}\n```\n### Maven\n```xml\n\u003crepositories\u003e\n    \u003crepository\u003e\n        \u003cid\u003eeternalcode-repo\u003c/id\u003e\n        \u003curl\u003ehttps://repo.eternalcode.pl/releases\u003c/url\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n```\n```xml\n\u003cdependencies\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003edev.rollczi\u003c/groupId\u003e\n        \u003cartifactId\u003eliteindex\u003c/artifactId\u003e\n        \u003cversion\u003e1.0.0\u003c/version\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frollczi%2Fliteindex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frollczi%2Fliteindex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frollczi%2Fliteindex/lists"}