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
//! # Traits for elements in sparse datastructures
//!
//! Once a sparse data structure contains references to values, it is not obvious what value should
//! be returned for a zero value, that is not stored. It is also not clear, how one should compare
//! the elements contained in the sparse structure with the zero element (mostly for debug
//! purposes).
//!
//! One idea, implemented here, is to have three types related to a sparse data structure:
//!
//! * The first is the type that is stored many times in the data structure
//! * The second is a type that can be zero (and is not a reference), ideally is small (Copy) and
//! not stored behind a reference (like `RationalBig`).
//! * The third is the type that both can be dereferenced to. This is used to create a row-major
//! copy of the constraint matrix using references, rather than the actual values.
use Borrow;
use ;
use NonZero;
/// Element of a `Vector` of `Matrix` type.
///
/// This is an alias for a traits that are needed to derive a few practical traits for the
/// aforementioned types.