Expand description
§Ternary Spreadsheet
Core logic for the SuperInstance Spreadsheet — a familiar spreadsheet interface where every cell is a tiny ternary intelligence.
Structs§
- Cell
- A single ternary cell with value, fitness, and history.
- Formula
Engine - The formula engine evaluates spreadsheet formulas against a grid.
- Grid
- A 2D grid of ternary cells.
- Mutation
Config - Configuration for autofill mutation.
Enums§
- Fitness
Color - Color assigned based on fitness score.
- Formula
Error - Errors that can occur during formula evaluation.
- Sort
Axis - Axis to sort by.
- Ternary
Value - A ternary value: negative, neutral, or positive.
Functions§
- autofill_
mutate - Autofill a range with mutation. Takes the source cell’s value and propagates it across the target range, applying random mutations based on the config. Returns the number of cells mutated.
- conditional_
format - Assign a fitness color to a cell.
- conditional_
format_ with_ thresholds - Assign fitness colors with custom thresholds.
- fitness_
heatmap - Compute a heatmap of fitness values for the entire grid.
Returns a Vec<Vec
> where each value is normalized to [0.0, 1.0]. - format_
cells - Format a slice of cells into their color codes.
- sort_
by_ fitness - Sort rows or columns by their total fitness (descending = fittest first).
Type Aliases§
- Formula
Result - Result of a formula evaluation.