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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
//! ONE ENTRY OF A FUSED ANSWER'S PROVENANCE — [`Sighting`], what a member said about a root and how
//! much that saying moved it.
//!
//! ```text
//! Fused { score, root, evidence: [ Sighting { contribution, ordinal, seen }, … ] }
//! │ │ └── the member's own evidence
//! │ └── the RANK that term was computed from
//! └── the WEIGHTED term it added to `score`
//! ```
//!
//! # It exists because the fold stopped stripping what it computes
//!
//! `fuse_weighted` multiplies a member's reciprocal-rank term by that member's weight, adds the
//! product into the root's score, and ORDERS the evidence by it. Until this type the product was
//! then dropped, and the evidence list was a bare `Vec<V>` whose order was the only trace left of a
//! number the fold had held in a local.
//!
//! That was defensible while the answer was Rust-only: a caller with the member's own `Ranked` could
//! recompute `1 / (k + rank)`, and a stored copy is a number that can disagree with the one the fold
//! used. The wire road ends it. A client reading a union variant has no `k`, no weight and no local
//! to recompute from, and the ordering alone cannot say whether the first entry led by a nose or by
//! a mile — so the number the fold already has is carried instead of computed twice.
//!
//! The recomputation argument does not survive the carry either, which is the part worth stating: a
//! number carried FROM the fold cannot disagree with the fold, because it IS the fold's. What could
//! disagree was the recomputation.
//!
//! # `Sighting` and [`Sightings`](crate::Sightings) are different things
//!
//! The plural one is the SET door's — how many of an entity's own vectors a stream ranked, and where
//! — and it belongs to the fold that accumulates across `m` query vectors. This one is a FUSED
//! answer's, one entry per member that ranked a root. Neighbouring words for neighbouring ideas, and
//! neither is the other's shorthand.
/// ONE MEMBER'S SIGHTING of a fused root — its own evidence, and the weighted term it contributed.
///
/// # The contribution is `f64` at every grain, and that is the framework's arithmetic rather than an
/// engine's
///
/// A member's own SCORE is that member's engine's currency and crosses as itself; the CONTRIBUTION
/// is what the fold made of that member's RANK, in the fold's own arithmetic — `weight × 1/(k+rank)`
/// — so it is one type however many currencies met. The same split [`FusedScore`](super::FusedScore)
/// already states one level up: what fuses is ordinals, and the numbers fusion produces are the
/// framework's.
///
/// # `Copy` where the evidence is, and `PartialEq` unconditionally on the pair
///
/// The derives follow `V`, so a sighting over an emitted evidence enum has exactly the faces that
/// enum has. Nothing here demands more of `V` than the answer it sits inside already does.