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
use crate::matrix::csr_matrix::CsrMatrixArray;
use crate::matrix::csr_matrix::CsrMatrixVecArray;
use crate::matrix::dr_matrix::DrMatrixArray;
use crate::matrix::dr_matrix::DrMatrixVecArray;
use crate::vec::css::CssArray;
use crate::vec::VecArray;
pub fn css_array() -> CssArray<[i32; 3], [usize; 3]> {
CssArray::new(10, [1, 2, 3], [1, 3, 9])
}
pub fn csr_matrix_empty_vec_array() -> CsrMatrixVecArray<[i32; 5], [usize; 5]> {
CsrMatrixVecArray::with_vec_array(5)
}
pub fn csr_matrix_array() -> CsrMatrixArray<[i32; 5], [usize; 5]> {
CsrMatrixArray::new([4, 5], [1, 2, 3, 4, 5], [0, 2, 1, 3, 4], [0, 2, 4, 4, 5])
}
pub fn dr_matrix_empty_vec_array() -> DrMatrixVecArray<[i32; 20]> {
DrMatrixVecArray::with_vec_array(5)
}
pub fn dr_matrix_array() -> DrMatrixArray<[i32; 20]> {
DrMatrixArray::new(
[4, 5],
[
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
],
)
}
pub fn vec_array() -> VecArray<[i32; 16]> {
use crate::prelude::DynDenseStoMut;
let mut va = VecArray::<[i32; 16]>::with_capacity();
va.extend(&[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
va
}