[][src]Trait basic_dsp_matrix::Matrix

pub trait Matrix<V, T>: MetaData + ResizeOps where
    V: Vector<T>,
    T: RealNumber
{ pub fn delta(&self) -> T;
pub fn set_delta(&mut self, delta: T);
pub fn row_len(&self) -> usize;
pub fn row_points(&self) -> usize;
pub fn col_len(&self) -> usize;
pub fn rows(&self) -> &[V];
pub fn rows_mut(&mut self) -> &mut [V]; }

A trait for matrix types. In this lib a matrix is simply a collection of vectors. The idea is that the matrix types can be used to reduce the size of a large matrix and that the return types are basic enough so that other specialized matrix libs can do the rest of the work, e.g. inverting the resulting matrix.

Required methods

pub fn delta(&self) -> T[src]

The x-axis delta. If domain is time domain then delta is in [s], in frequency domain delta is in [Hz].

pub fn set_delta(&mut self, delta: T)[src]

Sets the x-axis delta. If domain is time domain then delta is in [s], in frequency domain delta is in [Hz].

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

The number of valid elements in each row of the matrix. This can be changed with the Resize trait.

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

The number of valid points in a row. If the matrix is complex then every valid point consists of two floating point numbers, while for real vectors every point only consists of one floating point number.

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

The number of columns in the matrix.

pub fn rows(&self) -> &[V][src]

Gets the rows as vectors.

pub fn rows_mut(&mut self) -> &mut [V][src]

Gets the rows as mutable vectors.

Loading content...

Implementors

impl<V, S, T> Matrix<V, T> for Matrix2xN<V, S, T> where
    T: RealNumber,
    S: ToSlice<T>,
    V: Vector<T>, 
[src]

impl<V, S, T> Matrix<V, T> for Matrix3xN<V, S, T> where
    T: RealNumber,
    S: ToSlice<T>,
    V: Vector<T>, 
[src]

impl<V, S, T> Matrix<V, T> for Matrix4xN<V, S, T> where
    T: RealNumber,
    S: ToSlice<T>,
    V: Vector<T>, 
[src]

impl<V, S, T> Matrix<V, T> for MatrixMxN<V, S, T> where
    T: RealNumber,
    S: ToSlice<T>,
    V: Vector<T>, 
[src]

Loading content...