Trait corgi::array::Arrays [−][src]
Helper trait to construct Array
structs.
Required methods
Loading content...Implementations on Foreign Types
impl Arrays for Vec<Array>
[src]
Implementation to construct Array
structs by flattening other contained Array
structs, and keeping
their dimensions.
Examples
let a = Arrays::new(vec![arr![1.0, 2.0, 3.0], arr![4.0, 5.0, 6.0]]); assert_eq!(a[vec![1, 2]], 6.0);
impl Arrays for Vec<Float>
[src]
Implementation to construct Array
structs by using Vec<Float>
as the values, and by keeping flat dimensions.
Examples
let a = Arrays::new(vec![1.0, 2.0, 3.0, 4.0, 5.0, 6.0]); assert_eq!(a[vec![5]], 6.0);
impl Arrays for Vec<usize>
[src]
Implementation to construct Array
structs by using Vec<usize>
as the dimensions, and filling values with zeros.
Examples
let a = Arrays::new(vec![3, 2, 3]); assert_eq!(a[vec![2, 1, 1]], 0.0);
impl Arrays for (Vec<usize>, Vec<Float>)
[src]
Implementation to construct Array
structs by using Vec<usize>
as the dimensions, and Vec<Float>
as the values.
Examples
let a = Arrays::new((vec![2, 3], vec![1.0, 2.0, 3.0, 4.0, 5.0, 6.0])); assert_eq!(a[vec![1, 2]], 6.0);
impl Arrays for (Arc<Vec<usize>>, Arc<Vec<Float>>)
[src]
Implementation to construct Array
structs by using Arc<Vec<usize>>
as the dimensions, and Arc<Vec<Float>>
as the values.
Examples
let a = Arrays::new((Arc::new(vec![2, 3]), Arc::new(vec![1.0, 2.0, 3.0, 4.0, 5.0, 6.0]))); assert_eq!(a[vec![1, 2]], 6.0);