{"id":16189021,"url":"https://github.com/fogfish/skiplist","last_synced_at":"2025-10-24T04:10:18.648Z","repository":{"id":61627591,"uuid":"546844095","full_name":"fogfish/skiplist","owner":"fogfish","description":"Golang SkipList data structure","archived":false,"fork":false,"pushed_at":"2023-06-03T17:39:45.000Z","size":41,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-18T16:24:16.898Z","etag":null,"topics":["data-structures","golang","skiplist"],"latest_commit_sha":null,"homepage":"","language":"Go","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/fogfish.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2022-10-06T18:35:57.000Z","updated_at":"2022-10-07T21:36:07.000Z","dependencies_parsed_at":"2024-11-03T02:02:47.633Z","dependency_job_id":"b2d2c1b8-4385-454c-9263-e35e1202a792","html_url":"https://github.com/fogfish/skiplist","commit_stats":{"total_commits":18,"total_committers":1,"mean_commits":18.0,"dds":0.0,"last_synced_commit":"b31f8fa95ec848ba4c7f907667a43fb43077cc93"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fogfish%2Fskiplist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fogfish%2Fskiplist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fogfish%2Fskiplist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fogfish%2Fskiplist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fogfish","download_url":"https://codeload.github.com/fogfish/skiplist/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247666004,"owners_count":20975785,"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","golang","skiplist"],"created_at":"2024-10-10T07:33:23.462Z","updated_at":"2025-10-24T04:10:18.561Z","avatar_url":"https://github.com/fogfish.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ch3 align=\"center\"\u003eSkip List\u003c/h3\u003e\n  \u003cp align=\"center\"\u003e\u003cstrong\u003eprobabilistic, mutable list-based data structure\u003c/strong\u003e\u003c/p\u003e\n\n  \u003cp align=\"center\"\u003e\n    \u003c!-- Version --\u003e\n    \u003ca href=\"https://github.com/fogfish/skiplist/releases\"\u003e\n      \u003cimg src=\"https://img.shields.io/github/v/tag/fogfish/skiplist?label=version\" /\u003e\n    \u003c/a\u003e\n    \u003c!-- Documentation --\u003e\n    \u003ca href=\"https://pkg.go.dev/github.com/fogfish/skiplist\"\u003e\n      \u003cimg src=\"https://pkg.go.dev/badge/github.com/fogfish/skiplist\" /\u003e\n    \u003c/a\u003e\n    \u003c!-- Build Status  --\u003e\n    \u003ca href=\"https://github.com/fogfish/skiplist/actions/\"\u003e\n      \u003cimg src=\"https://github.com/fogfish/skiplist/workflows/test/badge.svg?branch=main\" /\u003e\n    \u003c/a\u003e\n    \u003c!-- GitHub --\u003e\n    \u003ca href=\"http://github.com/fogfish/skiplist\"\u003e\n      \u003cimg src=\"https://img.shields.io/github/last-commit/fogfish/skiplist.svg\" /\u003e\n    \u003c/a\u003e\n    \u003c!-- Coverage --\u003e\n    \u003ca href=\"https://coveralls.io/github/fogfish/skiplist?branch=main\"\u003e\n      \u003cimg src=\"https://coveralls.io/repos/github/fogfish/skiplist/badge.svg?branch=main\" /\u003e\n    \u003c/a\u003e\n    \u003c!-- Go Card --\u003e\n    \u003ca href=\"https://goreportcard.com/report/github.com/fogfish/skiplist\"\u003e\n      \u003cimg src=\"https://goreportcard.com/badge/github.com/fogfish/skiplist\" /\u003e\n    \u003c/a\u003e\n  \u003c/p\u003e\n\u003c/p\u003e\n\n---\n\nPackage `skiplist` implements a probabilistic, mutable list-based data structure that are a simple and efficient substitute for balanced trees. The algorithm is well depicted by [the article](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.17.524).\n\n## Inspiration\n\nThe library provides generic implementation of\n* `skiplist.Set[K]` ordered set of elements\n* `skiplist.Map[K]` ordered set of key, value pairs\n* `skiplist.GF2[K]` finite field on modulo 2  \n\nFor each of the data type it standardize interfaces around\n\n```go\n// Set behavior trait\ntype Set[K skiplist.Key] interface {\n  Add(K) bool\n  Has(K) bool\n  Cut(K) bool\n  Values(K) *Element[K]\n  Successors(K) *Element[K]\n  Split(K) Set[K]\n}\n\n// Map (Key, Value) pairs behavior trait\ntype Map[K skiplist.Key, V any] interface {\n  Put(K, V) bool\n  Get(K) (V, bool)\n  Cut(K) (V, bool)\n  Keys(K) *Element[K]\n  Successors(K) *Element[K]\n  Split(K) Map[K, V]\n}\n```\n\n## Installing \n\nThe latest version of the library is available at `main` branch. All development, including new features and bug fixes, take place on the `main` branch using forking and pull requests as described in contribution guidelines. The stable version is available via Golang modules.\n\n1. Use `go get` to retrieve the library and add it as dependency to your application.\n\n```bash\ngo get github.com/fogfish/skiplist@latest\n```\n\n2. Import it in your code\n\n```go\nimport (\n  \"github.com/fogfish/skiplist\"\n)\n```\n\n## Quick Example\n\nHere is a minimal example on creating an instance of the `skiplist.Map`. See the full [example](examples)\n\n```go\npackage main\n\nimport (\n  \"github.com/fogfish/skiplist\"\n)\n\nfunc main() {\n  kv := skiplist.NewMap[int, string]()\n\n  kv.Put(5, \"instance\")\n  kv.Get(5)\n  kv.Cut(5)\n}\n```\n\n## How To Contribute\n\nThe library is [MIT](LICENSE) licensed and accepts contributions via GitHub pull requests:\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Added some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n\nThe build and testing process requires [Go](https://golang.org) latest version.\n\n**Build** and **run** in your development console.\n\n```bash\ngit clone https://github.com/fogfish/skiplist\ncd skiplist\ngo test\n\ngo test -run=^$ -bench=. -cpu 1\n\ngo test -fuzz=FuzzSetAddCut\ngo test -fuzz=FuzzMapIntPutGet\ngo test -fuzz=FuzzMapStringPutGet\ngo test -fuzz=FuzzGF2\n```\n\n### commit message\n\nThe commit message helps us to write a good release note, speed-up review process. The message should address two question what changed and why. The project follows the template defined by chapter [Contributing to a Project](http://git-scm.com/book/ch5-2.html) of Git book.\n\n### bugs\n\nIf you experience any issues with the library, please let us know via [GitHub issues](https://github.com/fogfish/skiplist/issue). We appreciate detailed and accurate reports that help us to identity and replicate the issue. \n\n## License\n\n[![See LICENSE](https://img.shields.io/github/license/fogfish/skiplist.svg?style=for-the-badge)](LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffogfish%2Fskiplist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffogfish%2Fskiplist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffogfish%2Fskiplist/lists"}