Struct arrayfire::Dim4 [] [src]

pub struct Dim4 { /* fields omitted */ }

Dim4 is used to store Array dimensions

Methods

impl Dim4
[src]

Create Dim4 object

Examples

use arrayfire::Dim4;
let dims = Dim4::new(&[4, 4, 2, 1]);

Get the number of elements represented by Dim4 object

Get the number of dimensions of Dim4

Trait Implementations

impl Copy for Dim4
[src]

impl Clone for Dim4
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Dim4
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Debug for Dim4
[src]

Formats the value using the given formatter.

impl Default for Dim4
[src]

Default trait for Dim4 returns an Array of dimensions [1, 1, 1, 1]

Returns the "default value" for a type. Read more

impl Index<usize> for Dim4
[src]

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

The returned type after indexing

The method for the indexing (container[index]) operation

impl Display for Dim4
[src]

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

Formats the value using the given formatter. Read more