[−][src]Struct matfile::Array
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]
fn clone(&self) -> 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
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,