Skip to main content

Module fuse

Module fuse 

Source
Expand description

THE FUSION TREE’s own emission — the leaf and tier packages a declaration mints, and the Fusable impl a parent absorbs them through. THE FUSION TREE, as a declaration mints it: the leaf packages a slot is configured and asked with, the tier packages that fuse them, and the one [Fusable] impl that hands the whole subtree to a parent by projection.

#[ingraph::vector(upstream(node = "Keyframe", …))]
pub struct Frames {
  #[ingraph(list(embedding), knn(semantics(fold = "app::PositionWeighted")))]
  frames: Vec<Embedding<f32, DIM, Clip>>,
  #[ingraph(embedding, knn)]
  poster: Embedding<f32, DIM, Clip>,
}

mints, at module scope:

FramesFramesSemantics          SUM | MAX | POSITION_WEIGHTED   the wire fold vocabulary
FramesFramesVectorOptions      { semantics }                  one slot's knobs
FramesFramesVectorQuestion     { question, coordinates }       one slot's question
FramesPosterVectorOptions      { }
FramesPosterVectorQuestion     { question, coordinates }
FramesFuseOptions              { fusion, frames: Route<…>, poster: Route<…> }
FramesFuseQuestion             { question, frames: …, poster: … }
impl Fusable for Frames        Options = FramesFuseOptions, Question = FramesFuseQuestion

§THE BINDING TABLE is the whole of what a parent sees

A member’s package shape is its own business, and a parent absorbs whichever it is through one projection. Three shapes, picked here and nowhere else:

the tierits Fusable::Options
a full-text declaration (one subject, always)<Tier>FulltextOptions
a vector declaration electing ONE field, single-write<Index><Field>VectorOptions
a vector declaration electing one FANNED field<Index><Field>FuseOptions
a vector declaration electing several<Index>FuseOptions

§THE FUSED DOORS STAND BESIDE THE PER-KIND ONES AND NEVER INSTEAD OF THEM

Doors is the additive door law in one place: a tier with two or more routes of one modality grows that modality’s door, a tier with one route of EACH grows the mixed fuse, and every per-election door goes on emitting whatever happens. At the index grain the law resolves to vector_fuse alone — a full-text declaration is ONE route however many fields it elects, and a declaration’s kind is its modality, so the other two doors have no route set here. Their home is a SEARCH RECIPE, which lists the members it fuses and mints one door over exactly them.

§THE MODALITY PRESENCE LAW, at the grain this derive can see

A full-text declaration emits NOTHING vector-flavoured and a vector declaration emits NOTHING full-text-flavoured — not an empty package, not a package behind a bound nobody satisfies, but no type at all. It is free here because a declaration’s KIND is one of the three and its elections are all of that kind, so the law is the match at the top of Tier::emit rather than a filter anybody has to remember. A BLOB family emits nothing at all and gets no [Fusable] impl, which is what makes this member does not retrieve a compile fact at every parent’s projection.

§THE FRACTAL DESCENDS ONE MORE LEVEL AT A FANNED SLOT

A fanout election writes every declared engine at once, so its legs are routes: the slot’s package becomes a mini tier — a fusion flavour of its own and one [Route] per leg — and the parent wraps THAT in a route exactly as it wraps a flat leaf. Nothing about the parent changes, which is the property being built rather than a coincidence: a route’s interior is opaque to its parent.

What is per-LEG and what is per-FIELD is the one asymmetry worth reading twice. A fold is what turns m per-query numbers into one for a FIELD, and the field is one field however many engines hold it, so the semantics row rides the mini tier; a leg’s own package holds whatever is that ENGINE’s alone. The question side has no per-leg row at all, for the same reason: the legs are one field’s coordinates in several stores.

The leg package is EMPTY today, and the wall law is why: its one row was the request-side ceiling, and a protective number never crosses the wire. What a request still says about a leg it says on the leg’s Route — the parent’s weight, whether to walk it, and how deep.

§THE ENGINE SEAT IS THE ONE ROW WHOSE TYPE THE DECLARATION NAMES

Every other row of every package is typed by this emission — a count, a fold word, a flavour request, another package. The engine row is not: its variants hold numbers in ENGINE currencies, and there is no blanket type for one. So the declaration writes lance(resource = "path::To::Lance"), the leaf grows an @oneOf over the words that did, and each variant projects <T as VectorEngine>::Score and <T as VectorEngine>::SearchOptions off the type its word named — the ruled per-variant shape {floor, options}. The teeth come free with the projection — a type implementing no engine trait is E0277 where its author wrote it.

It is ADDITIVE in both directions: an untyped word contributes no variant, and a slot whose words are all untyped grows no seat at all. Today’s state IS the fallback.

§Option EVERYWHERE HERE, and that is the de-Option law rather than a habit

Every row of every package is an Option, and every one of them DEFERS: a row nobody wrote takes the declaration’s own — its declared fold, its declared floor. There is no value of any of these types that means the declaration’s, so absence is the only spelling available and the law is satisfied rather than worked around. The two fields that do NOT defer are on [Route], where they are bare and carry their constants.

A declared CEILING is not among them and cannot be: it is a WALL, so there is nothing for a request to defer to it with.

Structs§

Doors
WHICH of the three fused doors a tier emits — the ADDITIVE DOOR LAW, decided in one place.
Packages
THE PACKAGE EMITTER, at any GRAIN — the options-pattern struct, its wire face, and the two enum faces the fusion tree publishes.
Row
ONE ROW of an emitted package: a Rust member, the wire name it renders under, and the type it holds.
Tier
ONE TIER of the fusion tree — a declaration, read for what it routes to.

Functions§

engine_param
The ENGINE parameter one route is asked through — __INGRAPH_ENGINE_<FIELD>__, by score_param’s reading.
error_param
The ERROR parameter one route’s refusal rides — __INGRAPH_ERROR_<FIELD>__, by the same law.
score_param
The SCORE parameter one route’s currency rides — __INGRAPH_SCORE_<FIELD>__.