[][src]Function arrayfire::assign_seq

pub fn assign_seq<T: Copy, I>(
    lhs: &mut Array<I>,
    seqs: &[Seq<T>],
    rhs: &Array<I>
) where
    c_double: From<T>,
    I: HasAfEnum

Assign(copy) content of an Array to another Array indexed by Sequences

Assign rhs to lhs after indexing lhs

Examples

use arrayfire::{constant, Dim4, Seq, assign_seq, print};
let mut a = constant(2.0 as f32, Dim4::new(&[5, 3, 1, 1]));
print(&a);
// 2.0 2.0 2.0
// 2.0 2.0 2.0
// 2.0 2.0 2.0
// 2.0 2.0 2.0
// 2.0 2.0 2.0

let b    = constant(1.0 as f32, Dim4::new(&[3, 3, 1, 1]));
let seqs = &[Seq::new(1.0, 3.0, 1.0), Seq::default()];
assign_seq(&mut a, seqs, &b);

print(&a);
// 2.0 2.0 2.0
// 1.0 1.0 1.0
// 1.0 1.0 1.0
// 1.0 1.0 1.0
// 2.0 2.0 2.0