rff 0.3.0

rff is a fast, simple fuzzy text selector for the terminal.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Useful constants for score calculations.

use std::f64::{INFINITY, NEG_INFINITY};

pub const SCORE_MAX:               f64 = INFINITY;
pub const SCORE_MIN:               f64 = NEG_INFINITY;
pub const SCORE_GAP_LEADING:       f64 = -0.005;
pub const SCORE_GAP_TRAILING:      f64 = -0.005;
pub const SCORE_GAP_INNER:         f64 = -0.01;
pub const SCORE_MATCH_CONSECUTIVE: f64 = 1.0;
pub const SCORE_MATCH_SLASH:       f64 = 0.9;
pub const SCORE_MATCH_WORD:        f64 = 0.8;
pub const SCORE_MATCH_CAPITAL:     f64 = 0.7;
pub const SCORE_MATCH_DOT:         f64 = 0.6;