pub struct Dim4 { /* private fields */ }
Expand description
Dim4 is used to store Array dimensions
Implementations§
Trait Implementations§
Source§impl Display for Dim4
Enables use of Dim4 objects for printing it to display
impl Display for Dim4
Enables use of Dim4 objects for printing it to display
§Examples
use arrayfire::Dim4;
let dims = Dim4::new(&[4, 4, 2, 1]);
println!("0th Dimension length is {}", dims[0]); // -> 4
Source§impl Index<usize> for Dim4
Enables index operation for Dim4
impl Index<usize> for Dim4
Enables index operation for Dim4
§Examples
use arrayfire::Dim4;
let dims = Dim4::new(&[4, 4, 2, 1]);
println!("0th Dimension length is {}", dims[0]); // -> 4
println!("1th Dimension length is {}", dims[1]); // -> 4
println!("2th Dimension length is {}", dims[2]); // -> 2
println!("3th Dimension length is {}", dims[3]); // -> 1
Source§impl IndexMut<usize> for Dim4
Enables index operation for Dim4 to modify dimensions
impl IndexMut<usize> for Dim4
Enables index operation for Dim4 to modify dimensions
§Examples
use arrayfire::Dim4;
let mut dims = Dim4::new(&[4, 4, 2, 1]);
dims[2] = 4;
println!("Dimensions: {}", dims); // note that third dimension changed to 4
impl Copy for Dim4
impl StructuralPartialEq for Dim4
Auto Trait Implementations§
impl Freeze for Dim4
impl RefUnwindSafe for Dim4
impl Send for Dim4
impl Sync for Dim4
impl Unpin for Dim4
impl UnwindSafe for Dim4
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more