[−][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()); }
Implementations
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
Auto Trait Implementations
impl RefUnwindSafe for Array
impl Send for Array
impl Sync for Array
impl Unpin for Array
impl UnwindSafe for Array
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> 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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,