Skip to main content

Module subdivide

Module subdivide 

Source
Expand description

Subdivision search: the global method that finds every solution in a region by discarding the pieces that provably hold none and splitting the rest (see “Subdivide to isolate, then Newton to refine” in AGENTS.md).

Which pieces hold no solution, when a piece is small enough to report, and how to split one are the caller’s, in visit; this is the search around them. It promises completeness: every piece visit keeps is visited, in a fixed order, unless the node budget runs out — and then it says so, with how many pieces were left, rather than returning as if the search were done. A search cut short is incomplete, and neither “nothing found” nor anything else may be read into it.

Enums§

Order
In which order pieces are visited.
Searched
How a search ended.
Split
What a visit made of its piece.

Functions§

subdivide
Searches roots — in their order — and every piece a visit restricts or splits them into, visiting at most max_nodes pieces. visit gets a piece and the budget left after it (for a search of its own) and says what to do with it.