{"id":13730613,"url":"https://github.com/mpictor/judy-template","last_synced_at":"2026-01-11T10:32:30.041Z","repository":{"id":148796644,"uuid":"6845410","full_name":"mpictor/judy-template","owner":"mpictor","description":"An implementation of the Judy array, wrapped in a c++ template. Uses Karl Malbrain's implementation, http://code.google.com/p/judyarray/ . Public domain.","archived":false,"fork":false,"pushed_at":"2015-03-03T02:57:32.000Z","size":308,"stargazers_count":42,"open_issues_count":0,"forks_count":10,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-08-04T02:09:43.281Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","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/mpictor.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}},"created_at":"2012-11-24T23:07:32.000Z","updated_at":"2024-06-09T13:57:56.000Z","dependencies_parsed_at":"2023-03-29T19:48:36.377Z","dependency_job_id":null,"html_url":"https://github.com/mpictor/judy-template","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/mpictor%2Fjudy-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpictor%2Fjudy-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpictor%2Fjudy-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpictor%2Fjudy-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mpictor","download_url":"https://codeload.github.com/mpictor/judy-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224695603,"owners_count":17354435,"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-08-03T02:01:17.191Z","updated_at":"2026-01-11T10:32:29.986Z","avatar_url":"https://github.com/mpictor.png","language":"C","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"# Judy Array Templates\nThe Judy Array is a sparse dynamic array. It is a particular kind of trie that is highly efficient in space and time, and does not require tuning.\n\nThis uses [Karl Malbrain's implementation](http://code.google.com/p/judyarray/) of the Judy Array. Additional information can be found with Doug Baskins' [original implementation](http://judy.sourceforge.net/) on sourceforge, or on [Wikipedia](http://en.wikipedia.org/wiki/Judy_array).\n## The templates\n* `judyLArray` - a C++ template wrapper for an int-int Judy Array. JudyKey and JudyValue must be integer types and the same size as a pointer (i.e. 32- or 64-bit)\n* `judySArray` - Same as judyLArray, but with string-int mapping. The above restrictions on JudyValue apply here as well.\n* `judyL2Array`, `judyS2Array` - single-key, multi-value versions of the above\n* **TODO** - single-key, n-value versions of the above *(?)*\n\n## Comparison between this and the versions Karl and Doug wrote\n* Doug Baskins' code is licenced under the LGPL. While more permissive than the GPL, it's still not always acceptable. His code is very fast but weighs in at ~20k lines.\n* Karl Malbrain's code is ~1250 lines, in a single file containing the judy array and the test code; use requires creating a header.\n* Both of the above are written in C, so they don't fit neatly into object-oriented C++.\n* Unlike Doug's code, this is ~1250 lines. Unlike Karl's, this is split into several files.\n\n## Files\n* `CMakeLists.txt` - CMake build logic. If you don't have CMake, it should be quite easy to write a file for the build system of your choice.\n* **src/**\n * `judy.c`, `judy.h` - implementation of the Judy Array\n * `judyLArray.h` - the judyLArray template\n * `judySArray.h` - the judySArray template\n * `judyL2Array.h`, `judyS2Array.h` - single-key, multi-value versions of the above\n* **test/**\n * `hexSort.c` - Sorts a file where each line contains 32 hex chars. Compiles to `hexsort`, which is the same executable as compiling Karl's code with `-DHEXSORT -DSTANDALONE`\n * `pennySort.c` - Sorts strings; compiles to `pennysort`. Same as compiling Karl's code with `-DSTANDALONE`.\n * `sort.c`, `sort.h` - Karl's sorting functions. Only used by `hexsort` and `pennysort`.\n * `judyLtest.cc` - an incomplete test of the judyLArray template.\n * `judyL2test.cc` - an incomplete test of the judyL2Array template.\n * `judyStest.cc` - an incomplete test of the judySArray template.\n * `judyS2test.cc` - an incomplete test of the judyS2Array template.\n\n\n## Compiling\n* requires C and C++ compilers, CMake.\n* from the command line:\n *  `mkdir build; cd build`\n *  `cmake .. -DENABLE_TESTING=TRUE`\n *  `make`\n\n## License\n\nKarl Malbrain's judy array code is public domain; what I've added is public domain as well.\n\n## Contact\nmpictor -a-t- gmail\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpictor%2Fjudy-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmpictor%2Fjudy-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpictor%2Fjudy-template/lists"}