Struct fast_paths::Params
source · pub struct Params {
pub hierarchy_depth_factor: f32,
pub edge_quotient_factor: f32,
pub max_settled_nodes_initial_relevance: usize,
pub max_settled_nodes_neighbor_relevance: usize,
pub max_settled_nodes_contraction: usize,
}
Fields§
§hierarchy_depth_factor: f32
Smaller values typically yield less shortcuts and a faster preparation time. The relation to query speeds is less clear. For large values that yield a much higher number of shortcuts queries become slow, but otherwise the query speed might only change by a small amount when you change this parameter. The optimal value can only be found heuristically for your specific graph and can even depend on the other parameters below. We recommend trying different values between 0 and 1.
edge_quotient_factor: f32
This parameter is simply set to 1.0, because only it’s relative size compared to hierarchy_depth_factor plays a role.
max_settled_nodes_initial_relevance: usize
The maximum number of settled nodes per witness search performed when priorities are calculated for all nodes initially. Since this does not take much time you should probably keep the default.
max_settled_nodes_neighbor_relevance: usize
The maximum number of settled nodes per witness search performed when updating priorities of neighbor nodes after a node was contracted. The preparation time can strongly depend on this value and even setting it to a very small value like 0 or 1 might be feasible. Higher values (like ~500+) should yield less shortcuts and faster query times at the cost of a longer preparation time. Lower values (like ~0-100) should yield a faster preparation at the cost of slower query times and more shortcuts. To know for sure you should still run your own experiments for your specific graph.
max_settled_nodes_contraction: usize
The maximum number of settled nodes per witness search when contracting a node. Higher values like ~500+ mean less shortcuts (fast graph edges), slower preparation and faster queries. Lower values mean more shortcuts, slower queries and faster preparation.