use-geode 0.0.6

Utility-first Geode-array primitives for RustUse
Documentation

use-geode

Install

[dependencies]
use-geode = "0.0.1"

Foundation

use-geode provides a deliberately small exact-counting surface for finite type vectors [m2, m3, m4, ...], hyper-Catalan coefficients, and Geode coefficients defined by the factorization S - 1 = (t2 + t3 + t4 + ...) * G. The crate focuses on primitive u128 computations, small recursive Geode values, and structural polygon counts derived from a type vector.

This crate provides small, exact, educational and computational primitives inspired by the Geode series. It does not claim to implement the full theory, optimized large-scale Geode computation, or a closed form for the general Geode coefficient.

Helper group Primary items Best fit
Type vectors TypeVector, face_count Modeling small finite hyper-Catalan index vectors
Structural counts polygon_edge_count, polygon_vertex_count Exact subdivision counts derived from a type vector
Hyper-Catalan counts hyper_catalan, catalan_from_geode_dimension Exact coefficients for small hyper-Catalan workflows
Geode coefficients geode, geode_memoized, geode_on_first_axis, diagonal helpers Small recursive Geode-array calculations with checked arithmetic
Checked integer helpers checked_factorial, checked_product_factorials, exact_divide, GeodeError Call sites that need explicit overflow and divisibility failures instead of panicking

When to use directly

Choose use-geode directly when you want a small exact surface for Geode-array primitives and hyper-Catalan vectors without pulling in the wider facade crate.

Scenario Use use-geode directly? Why
You need exact small hyper-Catalan coefficients Yes The crate keeps the type-vector and coefficient surface narrow and explicit
You need small recursive Geode coefficients Yes The crate exposes direct checked helpers plus memoization for the same recurrence
You need broad math APIs beyond Geode-style counting Usually no use-math can compose this crate with the other focused math crates
You need large-scale symbolic or asymptotic Geode computation No That is intentionally outside the crate's scope

Scope

  • This crate is about Geode arrays, hyper-Catalan coefficients, and small exact coefficient calculations.
  • It is not geodesy, GIS, geospatial geometry, or coordinate-distance math.
  • Calculations stay in checked u128 arithmetic and return GeodeError values on overflow or invalid exact division.
  • Recursive Geode helpers are intended for small exact inputs, not large-scale enumeration or symbolic algebra.

Examples

Build a type vector and inspect its counts

use use_geode::{TypeVector, face_count, polygon_edge_count, polygon_vertex_count};

let vector = TypeVector::new(vec![2, 1])?;

assert_eq!(face_count(&vector), 3);
assert_eq!(polygon_edge_count(&vector)?, 8);
assert_eq!(polygon_vertex_count(&vector)?, 6);

# Ok::<(), use_geode::GeodeError>(())

Compute hyper-Catalan and Geode coefficients

use use_geode::{TypeVector, geode, geode_memoized, hyper_catalan};

let vector = TypeVector::new(vec![0, 1])?;

assert_eq!(hyper_catalan(&vector)?, 1);
assert_eq!(geode(&vector)?, 3);
assert_eq!(geode_memoized(&vector)?, 3);

# Ok::<(), use_geode::GeodeError>(())

Status

use-geode is a concrete pre-1.0 crate in the RustUse math workspace. The current surface is intentionally small, exact, and focused on finite Geode-array primitives rather than full formal-series machinery.