1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
use Witnessed;
/// Witness attached to values known to be valid for the normalized `[0, 1]`
/// scoring boundary.
;
/// Error returned when a value cannot be proven to be in the normalized
/// `[0, 1]` range.
;
/// Proves that an `f32` value is in the normalized `[0, 1]` range.
///
/// This function is suitable for use with [`witnessed::Witnessing::by`]:
///
/// ```
/// use score_set::traits::{prove_v01_f32, V01};
/// use witnessed::{WitnessExt, Witnessed};
///
/// let score: Witnessed<f32, V01> = 0.75_f32.witness().by(prove_v01_f32).unwrap();
/// assert_eq!(*score, 0.75);
/// ```
///
/// Values such as `NaN` are rejected because neither range comparison
/// succeeds for them.
/// Proves that an `f64` value is in the normalized `[0, 1]` range.
///
/// Values such as `NaN` are rejected because neither range comparison
/// succeeds for them.
/// Measures a context and returns a value chosen by the implementation.
///
/// `Output` is the value consumed by a corresponding `Map01F32` or `Map01F64`
/// implementation.
/// Maps a measurement into the `[0, 1]` range.
///
/// `Input` is associated with the mapper rather than fixed in the trait, so a
/// mapper can consume any measurement type. The normalized result carries the
/// [`V01`] witness.
/// Maps a measurement into the `[0, 1]` range.
///
/// `Input` is associated with the mapper rather than fixed in the trait, so a
/// mapper can consume any measurement type. The normalized result carries the
/// [`V01`] witness.
/// Evaluates a context into an `f64` score.
/// Evaluates a context into an `f32` score.