Optional #![forbid(unsafe_code)]
- Print methods
- Incremental min / max
- Ordered pair
- Option merge
- Result unwrap-any
Rangelike
, a trait accepting integers and integer ranges- Unsigned integers as bitsets
- Mixed-radix counter
- Child process spawn and pipe
#[autofill]
Pseudo-capture function arguments#[memoize]
Function memoization (caching)#[derive(CmpByKey)]
Order structs by a subset of fieldsstruct_input!
Use::proconio
to read data into a struct and set up helper macros#[transparent]
,#[semitransparent]
,#[opaque]
Modify declarative macro hygiene
- Binary search
- Ternary search
- Index compression
- Prefix sums
- Graph
- Dijkstra, 0-1 Dijkstra, BFS ⚙️
- Floyd-Warshall ⚙️
- DFS ⚙️
- Tarjan SCC ⚙️
- Rooted subtree function "rerooting"
- Mo's algorithm
- Inversion counting ⚙️
- Tensor ("n-dimensional vector") ⚙️
- Boolean/bit vector
- Meldable heap
- Generic augmented treap ⚙️
- Generic order-statistic treap ⚙️
List
, a sequence with O(log n) insert/delete ⚙️SortedList
, with rank- and order-statistics ⚙️
- Generic order-statistic treap ⚙️
- Generic sparse table ⚙️
- Generic segment tree supports lazy updates and "segtree beats" ⚙️
- n-dimensional Fenwick tree (binary-indexed tree) ⚙️
- Union-find
- XOR basis
- Triangular numbers
- All divisors of an integer using
::primal::Sieve
- Factorials mod n using
::ac_library::modint
⚙️ - Polynomial arithmetic ⚙️
- A few extra methods for
::euclid::Vector2D
⚙️
Items marked ⚙️ are working and tested but missing documentation - email or open an issue and I will add it
unsafe
- By default, this crate uses
#![forbid(unsafe_code)]
to guarantee no undefined behavior (UB). Theunsafe
feature drops this attribute to enable some performance gains - The library is still written such that UB should not be possible; however this becomes no longer verifiable by the compiler
- Currently, this affects:
NdVec
,BVec
,NdFenwick