Skip to main content

Module router

Module router 

Source
Expand description

Algorithm router and solver orchestrator.

The SolverRouter inspects a matrix’s SparsityProfile and the caller’s QueryType to select the optimal Algorithm for each solve request. The SolverOrchestrator wraps the router together with concrete solver instances and provides high-level solve / solve_with_fallback entry points.

§Routing decision tree

QueryConditionAlgorithm
LinearSystemdiag-dominant + very sparseNeumann
LinearSystemlow condition numberCG
LinearSystemelseBMSSP
PageRankSinglealwaysForwardPush
PageRankPairwiselarge graphHybridRandomWalk
PageRankPairwisesmall graphForwardPush
SpectralFilteralwaysNeumann
BatchLinearSystemlarge batchTRUE
BatchLinearSystemsmall batchCG

§Fallback chain

When the selected algorithm fails (non-convergence, numerical instability), SolverOrchestrator::solve_with_fallback tries a deterministic chain:

selected algorithm -> CG -> Dense

Structs§

RouterConfig
Configuration thresholds that govern the routing decision tree.
SolverOrchestrator
High-level solver facade that combines routing with execution.
SolverRouter
Stateless algorithm selector.