[][src]Struct matfile::Array

pub struct Array { /* fields omitted */ }

A numeric array (the only type supported at the moment).

You can access the arrays of a MatFile either by name or by iterating through all of them:

if let Some(array_a) = mat_file.find_by_name("A") {
    println!("Array \"A\": {:#?}", array_a);
}
 
for array in mat_file.arrays() {
    println!("Found array named {} of size {:?}", array.name(), array.size());
}

Methods

impl Array[src]

pub fn name(&self) -> &str[src]

The name of this array.

pub fn size(&self) -> &Vec<usize>[src]

The size of this array.

The number of entries in this vector is equal to the number of dimensions of this array. Each array has at least two dimensions. For two-dimensional arrays the first dimension is the number of rows while the second dimension is the number of columns.

pub fn ndims(&self) -> usize[src]

The number of dimensions of this array. Is at least two.

pub fn data(&self) -> &NumericData[src]

The actual numerical data stored in this array.

if let matfile::NumericData::Double { real: real, imag: _ } = array.data() {
    println!("Real part of the data: {:?}", real);
}

For a more convenient access to the data, consider using the matfile-ndarray crate.

Trait Implementations

impl Clone for Array[src]

default fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Array[src]

Auto Trait Implementations

impl Send for Array

impl Sync for Array

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]