v0.2.0
v0.2.0 — Installable package, vectorized batch API, input validation, property-based tests
Added
- Installable package:
pip install git+https://github.com/consigcody94/quaternion-monoid-algebranow works. Properquaternion_monoid_algebrapackage withpyproject.tomland optional extras (test,topology,gpu). - Vectorized batch API:
PacketArray(struct-of-arrays),packet_product_batch, andreduce_packets— an O(log N)-depth tree reduction of packet chains, legal because ⊗ is associative. Roughly 90× scalar throughput on CPU (benchmarks/bench.py). validate_monoid_table: vets custom Cayley tables (closure, identity laws, full associativity) with a counterexample on failure.- pytest + Hypothesis property suite (54 tests) alongside the original property runner and stress tests.
- Throughput benchmarks and a ruff lint gate in CI.
Changed
packet_poweris now O(log n) via exponentiation by squaring.make_xor_tablevectorized.- CI installs the package, runs the pytest suite, and no longer masks stress-test failures.
Fixed
Packet/PacketArrayvalidate inputs: zero/non-finite quaternions and non-positive/non-finite scales are rejected at construction.- Quaternion normalization is overflow/underflow-safe (max-component pre-scaling): components above ~1e154 no longer silently store a zero quaternion; components below ~1e-162 are no longer falsely rejected.
Packet.__eq__tolerances tightened and documented: quaternion absolute 1e-9, scale relative 1e-9 (numpy's defaultrtol=1e-5previously dominated).
Full details in CHANGELOG.md.