Struct fiveo::MatcherParameters
[−]
[src]
pub struct MatcherParameters { pub slash_bonus: f32, pub separator_bonus: f32, pub camelcase_bonus: f32, pub period_bonus: f32, pub max_gap: usize, pub cache_size: usize, pub distance_penalty: f32, pub min_distance_penalty: f32, pub cumulative_distance_penalty: f32, }
A set of parameters that can be tuned to change the scores assigned to certain matches.
Fields
slash_bonus: f32
The bonus for a matching character found after a slash.
separator_bonus: f32
The bonus for a matching character found after a separator.
camelcase_bonus: f32
The bonus for a matching character found as a separator of a CamelCase string.
period_bonus: f32
The bonus for a matching character found after a period.
max_gap: usize
The maximum gap between a search character and a match to be considered before moving to the next character.
cache_size: usize
The size of the cache that will be allocated each search for memoizing score function calls. Query/candidate pairs exceeding this size will only be matched using the simple matcher.
distance_penalty: f32
The base distance penalty for matches occurring after proceeding without a successful match.
min_distance_penalty: f32
The lowest value the distance penalty can decrease to.
cumulative_distance_penalty: f32
The increment that the distance penalty decreases in.
Trait Implementations
impl Default for MatcherParameters
[src]
Define a sane set of default MatcherParameters
that adhere to the same parameters followed by Cmd-T.
The rules in these default parameters prefers slashes over separators, and camelcase / separators over periods, with a max gap of 10.