FMat

Struct FMat 

Source
#[repr(C)]
pub struct FMat<'a, X> { /* private fields */ }
Expand description

Immutable matrix of real valued data.

Implementations§

Source§

impl<'a, X> FMat<'a, X>

Source

pub fn length(&self) -> usize

Source

pub fn height(&self) -> usize

Source

pub fn get_sample(&self, channel: usize, position: usize) -> Result<Smpl>

Read sample value in a buffer

Source

pub fn get_vec(&self) -> Vec<&mut [Smpl]>

Source§

impl<'a> FMat<'a, ()>

Source

pub unsafe fn from_raw_ptr(ptr: *const fmat_t) -> Self

Create a matrix from an already existing fmat_t pointer.

The matrix is non-owned; useful to avoid double-frees for FilterBank, for instance.

§Safety
  • The ptr must not be null.
  • The ptr should points to already initialized matrix data.

Trait Implementations§

Source§

impl<'a, T: AsRef<[&'a [Smpl]]>> From<T> for FMat<'a, FMatVecs>

Source§

fn from(data: T) -> Self

Create a matrix from a FMatVecs

Matrix’s horizontal height is the Vec’s len, and its vertical length the slice’s len.

Auto Trait Implementations§

§

impl<'a, X> Freeze for FMat<'a, X>
where X: Freeze,

§

impl<'a, X> RefUnwindSafe for FMat<'a, X>
where X: RefUnwindSafe,

§

impl<'a, X> !Send for FMat<'a, X>

§

impl<'a, X> !Sync for FMat<'a, X>

§

impl<'a, X> Unpin for FMat<'a, X>
where X: Unpin,

§

impl<'a, X> UnwindSafe for FMat<'a, X>
where X: 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> 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<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.