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
//! Shared trait boundaries for the crate.
//!
//! `EdgeFloat` is the bound every algorithm in `edge-rs` is generic over.
//!
//! Note the split documented in the crate root: `EdgeFloat` covers the data
//! layer (counts, offsets, fitted values), while likelihood evaluation,
//! Cox-Reid determinants, the optimisers and every p-value run in `f64`
//! regardless of `T`. Single-cell counts are worth holding as `f32` to halve
//! memory; a negative binomial deviance accumulated in `f32` is not.
use Display;
use Sum;
use ;
use ;
use TotalOrder;
use ;
use crateEdgeSimd;
/// Floating-point types usable as the numeric type of an `edge-rs` algorithm.
///
/// This is a blanket-implemented marker: it requires no methods of its own and
/// exists purely to collapse a long bound list into one name. `f32` and `f64`
/// both satisfy it.
///
/// The bounds break down as: `Float`/`FromPrimitive`/`ToPrimitive` for the
/// numerics, `ComplexField`/`RealField` for faer interoperability,
/// `Send`/`Sync` for the rayon fan-out over genes, `EdgeSimd` for the
/// vectorised kernels, and `TotalOrder` for the sorts in normalisation, which
/// must be deterministic in the presence of NaN rather than merely fast.