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
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT license.
*/
/// The DiskANN library uses `f32` values to represent similarity scores, but distance
/// functions can return either similarity-scores (those that are potentially transformed
/// so that minimization yields higher similarity) and mathematical values (those that
/// are computed from the mathematical definition of the operation.
///
/// Since those are currently mixed in the library with the more common use being a
/// similarity-score, make the `MathematicalValue` the type to represent no transformation
/// was performed.
where
T: Copy;
/// The DiskANN library uses `f32` values to represent similarity scores, but distance
/// functions can return either similarity-scores (those that are potentially transformed
/// so that minimization yields higher similarity) and mathematical values (those that
/// are computed from the mathematical definition of the operation.
///
/// Since those are currently mixed in the library with the more common use being a
/// similarity-score, make the `MathematicalValue` the type to represent no transformation
/// was performed.
where
T: Copy;