Skip to main content

Crate ternary_spreadsheet

Crate ternary_spreadsheet 

Source
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.
FormulaEngine
The formula engine evaluates spreadsheet formulas against a grid.
Grid
A 2D grid of ternary cells.
MutationConfig
Configuration for autofill mutation.

Enums§

FitnessColor
Color assigned based on fitness score.
FormulaError
Errors that can occur during formula evaluation.
SortAxis
Axis to sort by.
TernaryValue
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§

FormulaResult
Result of a formula evaluation.