InterleavedComplexArray

Struct InterleavedComplexArray 

Source
pub struct InterleavedComplexArray<T, P> { /* private fields */ }

Implementations§

Source§

impl<T: MatlabNumber> InterleavedComplexArray<T, MxArray>

Source

pub fn new( data: Box<[Complex<T>]>, shape: &[usize], ) -> ToMatlabResult<Self, Box<[Complex<T>]>>

Methods from Deref<Target = mxArray>§

Source

pub fn duplicate(&self) -> MxArray

Create a deep copy of the array, and return as an owned type. However, consider using MatlabClass::duplicate instead if you are already working with MatlabClasses.

Source

pub fn dimensions(&self) -> &[usize]

Return the sizes of the constituent dimensions of the mxArray

Source

pub fn numel(&self) -> usize

Return the number of elements contained in this array.

Source

pub fn raw_class_id(&self) -> u32

Return the raw class ID; the number Matlab returns.

Source

pub fn class_id(&self) -> Result<ClassID, u32>

Return Ok(ClassID) for mxArrays which map to a built-in class (such as numeric arrays, structure arrays, and cell arrays (see ClassID); otherwise it returns the raw class ID in the Err variant. These other values of the raw class ID are used in modern versions of Matlab for custom classes, defined via e..g classdef.

Source

pub fn is_complex(&self) -> bool

Check whether the backing array is complex. Since the only arrays which can be complex are numeric arrays, this also implies that.

Source

pub fn is_sparse(&self) -> bool

Check whether the backing array is a sparse matrix

Source

pub fn is_struct(&self) -> bool

Check whether the backing array is a struct array

Source

pub fn is_empty(&self) -> bool

Check whether the backing array is empty

Source

pub fn is_scalar(&self) -> bool

Check whether the backing array only holds one element

Source

pub fn complexity(&self) -> Complexity

Trait Implementations§

Source§

impl<T: Clone, P: Clone> Clone for InterleavedComplexArray<T, P>

Source§

fn clone(&self) -> InterleavedComplexArray<T, P>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'p, T, P> ComplexNumericArray<'p> for InterleavedComplexArray<T, P>
where T: MatlabNumber + 'p, P: MatlabPtr + 'p,

Source§

type CDT = T

Source§

fn complex_data( &self, ) -> ComplexData<&'p [Complex<Self::CDT>], Complex<&'p [Self::CDT]>>

Source§

impl<T: Debug, P: Debug> Debug for InterleavedComplexArray<T, P>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T, P> Deref for InterleavedComplexArray<T, P>
where P: MatlabPtr,

Source§

type Target = mxArray_tag

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<T, P> DerefMut for InterleavedComplexArray<T, P>
where P: MutMatlabPtr,

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl<'a, 'b, T, P> From<&InterleavedComplexArray<T, P>> for ArrayViewD<'a, Complex<T>>
where T: MatlabNumber, P: MatlabPtr + 'a, 'b: 'a,

Source§

fn from(num: &InterleavedComplexArray<T, P>) -> Self

Converts to this type from the input type.
Source§

impl<'a, 'b, T, P> From<&'b mut InterleavedComplexArray<T, P>> for ArrayViewMutD<'a, Complex<T>>
where T: MatlabNumber, P: MutMatlabPtr + 'a, 'b: 'a,

Source§

fn from(num: &mut InterleavedComplexArray<T, P>) -> Self

Converts to this type from the input type.
Source§

impl<T> From<[Complex<T>; 0]> for InterleavedComplexArray<T, MxArray>
where T: MatlabNumber,

Source§

fn from(_empty: [Complex<T>; 0]) -> Self

Converts to this type from the input type.
Source§

impl<'a, T, D> From<ArrayBase<OwnedRepr<Complex<T>>, D>> for InterleavedComplexArray<T, MxArray>
where T: MatlabNumber, D: Dimension,

Source§

fn from(arr: Array<Complex<T>, D>) -> Self

Converts to this type from the input type.
Source§

impl<T> From<Complex<T>> for InterleavedComplexArray<T, MxArray>
where T: MatlabNumber,

Source§

fn from(cn: Complex<T>) -> Self

Converts to this type from the input type.
Source§

impl<'a, T> From<InterleavedComplexArray<T, &'a mut mxArray_tag>> for ArrayViewMutD<'a, Complex<T>>
where T: MatlabNumber,

Source§

fn from(num: InterleavedComplexArray<T, &'a mut mxArray>) -> Self

Converts to this type from the input type.
Source§

impl<'a, T> From<InterleavedComplexArray<T, &'a mxArray_tag>> for ArrayViewD<'a, Complex<T>>
where T: MatlabNumber,

Source§

fn from(num: InterleavedComplexArray<T, &'a mxArray>) -> Self

Converts to this type from the input type.
Source§

impl<T> FromVec<Complex<T>> for InterleavedComplexArray<T, MxArray>
where T: MatlabNumber,

Source§

fn from_boxed_slice<L: VecLayout>(b: Box<[Complex<T>]>, l: L) -> Self

Convert a boxed slice into some matlab type.
Source§

fn from_vec<L>(v: Vec<T>, l: L) -> Self
where L: VecLayout, Self: Sized,

Convert an owned Vec<T> to some Matlab class.
Source§

fn from_slice<S, L>(s: S, l: L) -> Self
where S: Into<Box<[T]>>, L: VecLayout, Self: Sized,

Source§

impl<T, P> MatlabClass<P> for InterleavedComplexArray<T, P>
where T: MatlabNumber, P: MatlabPtr,

Source§

type Owned = InterleavedComplexArray<T, MxArray>

The owned variant of this matlab class.
Source§

fn from_mx_array(mx: P) -> Result<Self, FromMatlabError<P>>

Try to build a matlab class from a MatlabPtr. If the type requirements of the class match what the pointer is, then the class is constructed. Otherwise, an error is returned; containing the reason of the failure and the original pointer. The latter is especially useful with MxArrays; the owned MatlabPtr type — otherwise it would be dropped.
Source§

fn into_inner(self) -> P

Deconstruct the MatlabClass back to a bare MatlabPtr.
Source§

fn inner(&self) -> &P

Get a reference to the inner MatlabPtr. However, note that for &mxArray and &mut mxArray, the returned references will be of type &&mxArray and &&mut mxArray.
Source§

fn duplicate(&self) -> Self::Owned

Make a deep clone of the inner MatlabPtr, and construct an Owned MatlabClass from it.
Source§

impl<T, P> MutMatlabClass<P> for InterleavedComplexArray<T, P>

Source§

type AsBorrowed<'a> = InterleavedComplexArray<T, &'a mxArray_tag> where P: 'a, T: 'a

Source§

fn as_borrowed<'a>(&'a self) -> Self::AsBorrowed<'a>

Source§

fn inner_mut(&mut self) -> &mut P

Source§

impl<'p, T, P> MutNumericArray<'p> for InterleavedComplexArray<T, P>
where T: MatlabNumber + 'p, P: MutMatlabPtr + 'p,

Source§

type MutData = &'p mut [Complex<T>]

Source§

fn mut_data(&mut self) -> Self::MutData

Source§

impl<T> NewEmpty for InterleavedComplexArray<T, MxArray>
where T: MatlabNumber,

Source§

fn new_empty() -> Self

Construct the empty type
Source§

impl<'p, T, P> NumericArray<'p> for InterleavedComplexArray<T, P>
where T: MatlabNumber + 'p, P: MatlabPtr + 'p,

Source§

type Data = &'p [Complex<T>]

Source§

fn data(&self) -> Self::Data

Source§

impl<T> OwnedMatlabClass for InterleavedComplexArray<T, MxArray>
where T: MatlabNumber,

Source§

type AsMutable<'a> = InterleavedComplexArray<T, &'a mut mxArray_tag> where Self: 'a

The way this class would be represented if it were a mutable borrow.
Source§

fn as_mutable<'a>(&'a mut self) -> Self::AsMutable<'a>

Create a MutMatlabClass from this owned instance.
Source§

impl<T: PartialEq, P: PartialEq> PartialEq for InterleavedComplexArray<T, P>

Source§

fn eq(&self, other: &InterleavedComplexArray<T, P>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T, P> TakeData<P> for InterleavedComplexArray<T, P>

Source§

type OwnedData = Box<[Complex<T>]>

The type of data that this array wraps.
Source§

fn take_data(&mut self) -> Self::OwnedData

Take the data out of the array, leaving it in an empty state.
Source§

impl<T: Copy, P: Copy> Copy for InterleavedComplexArray<T, P>

Source§

impl<T: Eq, P: Eq> Eq for InterleavedComplexArray<T, P>

Source§

impl<T, P> StructuralPartialEq for InterleavedComplexArray<T, P>

Auto Trait Implementations§

§

impl<T, P> Freeze for InterleavedComplexArray<T, P>
where P: Freeze,

§

impl<T, P> RefUnwindSafe for InterleavedComplexArray<T, P>

§

impl<T, P> Send for InterleavedComplexArray<T, P>
where P: Send, T: Send,

§

impl<T, P> Sync for InterleavedComplexArray<T, P>
where P: Sync, T: Sync,

§

impl<T, P> Unpin for InterleavedComplexArray<T, P>
where P: Unpin, T: Unpin,

§

impl<T, P> UnwindSafe for InterleavedComplexArray<T, P>
where P: UnwindSafe, T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<'a, A, D, T> AsArray<'a, A, D> for T
where A: 'a, T: Into<ArrayBase<ViewRepr<&'a A>, D>>, D: Dimension,