Expand description
Arithmetic function nodes.
Core integer operations for the Polydat DAG. These are the building blocks that most workloads compose: hash → mod → add for bounded IDs, mixed_radix for coordinate decomposition, interleave for combining independent dimensions.
Structs§
- Add
- Add a constant to a u64 value (wrapping).
- Ceil
ToMultiple - Smallest multiple of
multiplethat is ≥value. - Clamp
- Clamp an unsigned integer to [min, max].
- Div
- The
divnode. - DivWire
- Division of a u64 by a wire-fed divisor. SRD-80 PR B.14 migration — same NonZeroU64 contract as mod_wire.
- Interleave
- Interleave the bits of two u64 values into one (Morton code).
- Max
- The
maxnode. - Min
- The
minnode. - Mixed
Radix - Decompose
valueinto mixed-radix digits using the givenradixes. The output is a vector of N digits where N =radixes.len(). A radix of 0 in the trailing position captures the remainder verbatim. - Mod
- The
modnode. - ModWire
- Modulo of a u64 value by a wire-fed divisor.
- Mul
- The
mulnode. - Multiples
AtLeast - Count of multiples of
multipleneeded to covervalue. - Product
- The
productnode. - SetOr
Get - “Set-or-get” memoizer: returns
currentif non-zero, otherwise returnsfallback. - Sum
- Sum N u64 inputs (wrapping). Variadic: accepts 0..N wire inputs.
Functions§
- signatures
- Signatures for arithmetic and variadic nodes.