pub struct RouterConfig {
pub neumann_spectral_radius_threshold: f64,
pub cg_condition_threshold: f64,
pub sparsity_sublinear_threshold: f64,
pub true_batch_threshold: usize,
pub push_graph_size_threshold: usize,
}Expand description
Configuration thresholds that govern the routing decision tree.
All thresholds have sensible defaults; override them when benchmarks on your workload indicate a different crossover point.
§Example
use ruvector_solver::router::RouterConfig;
let config = RouterConfig {
cg_condition_threshold: 50.0,
..Default::default()
};Fields§
§neumann_spectral_radius_threshold: f64Maximum spectral radius for which the Neumann series is attempted.
If the estimated spectral radius exceeds this value the router will not select Neumann even for diagonally dominant matrices.
Default: 0.95.
cg_condition_threshold: f64Maximum condition number for which CG is preferred over BMSSP.
CG converges in O(sqrt(kappa)) iterations; when kappa is too large a preconditioned method (BMSSP) is cheaper.
Default: 100.0.
sparsity_sublinear_threshold: f64Maximum density (fraction of non-zeros) for the Neumann sublinear fast-path.
Neumann is only worthwhile when the matrix is truly sparse.
Default: 0.05 (5%).
true_batch_threshold: usizeMinimum batch size for which the TRUE solver is preferred over CG
in BatchLinearSystem queries.
Default: 100.
push_graph_size_threshold: usizeGraph size threshold (number of rows) above which
PageRankPairwise switches from ForwardPush to HybridRandomWalk.
Default: 1_000.
Trait Implementations§
Source§impl Clone for RouterConfig
impl Clone for RouterConfig
Source§fn clone(&self) -> RouterConfig
fn clone(&self) -> RouterConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more