{"id":30873515,"url":"https://github.com/datawraith/utility-belt","last_synced_at":"2025-09-07T23:11:23.123Z","repository":{"id":212993764,"uuid":"732757446","full_name":"DataWraith/utility-belt","owner":"DataWraith","description":"Advent of Code Utilities","archived":false,"fork":false,"pushed_at":"2025-01-17T19:48:01.000Z","size":433,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-17T20:33:59.784Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":false,"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/DataWraith.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":"2023-12-17T18:22:26.000Z","updated_at":"2025-01-17T19:48:02.000Z","dependencies_parsed_at":"2024-12-15T11:25:12.877Z","dependency_job_id":"696711a6-ffc8-4b51-9a02-81013e239523","html_url":"https://github.com/DataWraith/utility-belt","commit_stats":null,"previous_names":["datawraith/utility-belt"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DataWraith/utility-belt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataWraith%2Futility-belt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataWraith%2Futility-belt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataWraith%2Futility-belt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataWraith%2Futility-belt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DataWraith","download_url":"https://codeload.github.com/DataWraith/utility-belt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataWraith%2Futility-belt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274107977,"owners_count":25223473,"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","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-09-07T23:11:22.214Z","updated_at":"2025-09-07T23:11:23.111Z","avatar_url":"https://github.com/DataWraith.png","language":"Rust","readme":"# Utility-Belt\n\n[![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/)\n\nThis is my Rust library of potentially useful tools for Advent of Code.\n\n## Using\n\nAdd `utility-belt` to your `Cargo.toml`:\n\n```toml\n[dependencies]\nutility-belt = { git = \"https://github.com/DataWraith/utility-belt.git\" }\n```\n\nIn your Advent of Code projects, simply `use utility_belt::prelude::*;`.\n\n## What's currently here?\n\n### Re-exports\n\nMost of the heavy-lifting is done by the other libraries this crate re-exports:\n\n- [ahash](https://docs.rs/ahash) - fast HashMap and HashSet implementation\n- [bittle](https://docs.rs/bittle) - zero-cost bitsets over native Rust types\n- [counter](https://docs.rs/counter) - count elements in iterables\n- [indoc](https://docs.rs/indoc) - exposes macros for convenient inline String formatting\n- [itertools](https://docs.rs/itertools) - various tools for working with iterators\n- [ndarray](https://docs.rs/ndarray) - n-dimensional container for general elements\n\n### Advent of Code-specific tools\n\n- **Grid2D**, a convenient 2D grid backed by `ndarray::Array2`. It comes with\n  the ability to parse grids from the usual puzzle-input format for grids and\n  provides various utility functions for working with 2D grids.\n\n  Comes with various ancillary structs (e.g. `Direction` and `Coordinate`) to\n  make working with grids easier.\n\n- A few useful **math functions** (`gcd` and `lcm` for now), a few helpers for\n  working with polynomials.\n\n- Functions for calculating **area** of a simple polygon and determining whether\n  or not a **point is inside of a polygon**.\n\n- **Cumulative sum** helpers in 1D (`PrefixSum`) and 2D (`SummedAreaTable`).\n\n  These allow you to quickly look up the sum of values in a given 1D range or 2D\n  rectangle.\n\n- **bisection search** function\n\n- **union-find datastructure** for easy connected components analysis\n\n- **path contraction** for iterating a function millions of times, provided that\n  there are cycles in the state-space path the function induces.\n\n- **state iteration**\n\n  The idea is to have a HashMap containing the current states. Then a transition\n  function is applied to each state, and the resulting state(s) are collected into\n  a new HashMap.\n\n  The HashMap keeps track of how often a given state has occurred. This can be\n  used to, for example, count how often a state is visited in a finite state\n  machine after `n` iterations.\n\n- an implementation of **branch and bound**\n\n- Small **bitsets** for 8, 16, 32, 64 and 128 values\n\n- Beam Search\n\n- Solving equation systems using **Gauss-Jordan elimination**\n\n- Chinese Remainder Theorem\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatawraith%2Futility-belt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatawraith%2Futility-belt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatawraith%2Futility-belt/lists"}