Skip to main content

Module iterate

Module iterate 

Source
Expand description

Fixed-point iteration from sharp seeds: the loop every Newton-type method of the kernel runs — foot points, a ball rolled between faces, a vertex moved onto offset surfaces, a traced curve’s corrector.

Each step takes a seed to the next iterate. The iterate is kept twice (see “Sharpen only where the value is a free choice” in AGENTS.md): as the seed of the next step, sharpened — any point of it serves equally well, and left wide each step would compound the width of the last — and as the answer, with the width the step honestly gave it. Which of the two a caller returns says whether its value is a free choice (a construction aid, a seed for something else) or an answer that later interval tests compare against.

A deterministic iteration whose sharp seed repeats one before it is done: from there on the seeds repeat with that period, so what the remaining steps would end at is known (Repeat). Not a convergence tolerance — the seed is bit for bit one seen before.

Structs§

Iterated
Where an iteration ended: its last seed — sharp, the start of a step not taken — and the answer the last step taken gave, or the initial answer if none was.

Enums§

End
How an iteration ended.
Repeat
When an iteration stops because a seed repeats.
Step
What one step found at its seed.

Traits§

Iterate
A value an iteration can tell apart from another, bit for bit: what Repeat compares seeds with.

Functions§

iterate
Iterates step from seed at most steps times. Each Step::Next is made into the next seed and the answer by settle — typically the iterate sharpened and clamped into a domain, and the iterate clamped (sharpen before clamping: clamped’s comparisons are exact on a sharp value, so the seed stays in the domain). answer is what is returned as the answer if no step is taken. The iteration stops early, with the result it would have reached, where repeat says.