Trait Vector

Source
pub trait Vector<T> {
    // Required methods
    fn len(&self) -> u32;
    fn as_ptr(&self) -> *const T;
    fn as_mut_ptr(&mut self) -> *mut T;

    // Provided methods
    fn inc(&self) -> u32 { ... }
    fn is_empty(&self) -> bool { ... }
}
Expand description

Methods that allow a type to be used in BLAS functions as a vector.

Required Methods§

Source

fn len(&self) -> u32

The number of elements in the vector.

Source

fn as_ptr(&self) -> *const T

An unsafe pointer to a contiguous block of memory.

Source

fn as_mut_ptr(&mut self) -> *mut T

An unsafe mutable pointer to a contiguous block of memory.

Provided Methods§

Source

fn inc(&self) -> u32

The stride within the vector. For example, if inc returns 7, every 7th element is used. Defaults to 1.

Source

fn is_empty(&self) -> bool

Check if Vector is empty

Trait Implementations§

Source§

impl<'a, T> Add for &'a dyn Vector<T>
where T: Axpy + Copy + Default,

Source§

type Output = Vec<T>

The resulting type after applying the + operator.
Source§

fn add(self, x: &dyn Vector<T>) -> Vec<T>

Performs the + operation. Read more
Source§

impl<'a, T> BitXor<Marker> for &'a dyn Vector<T>

Source§

type Output = Trans<&'a dyn Vector<T>>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, m: Marker) -> Trans<&'a dyn Vector<T>>

Performs the ^ operation. Read more
Source§

impl<'a, T> Into<Vec<T>> for &'a dyn Vector<T>
where T: Copy,

Source§

fn into(self) -> Vec<T>

Converts this type into the (usually inferred) input type.
Source§

impl<'a> Mul<&'a dyn Vector<Complex<f32>>> for Complex32

Source§

type Output = Vec<Complex<f32>>

The resulting type after applying the * operator.
Source§

fn mul(self, x: &dyn Vector<Complex32>) -> Vec<Complex32>

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a dyn Vector<Complex<f64>>> for Complex64

Source§

type Output = Vec<Complex<f64>>

The resulting type after applying the * operator.
Source§

fn mul(self, x: &dyn Vector<Complex64>) -> Vec<Complex64>

Performs the * operation. Read more
Source§

impl<'a, T> Mul<&'a dyn Vector<T>> for &'a dyn Matrix<T>
where T: Default + Copy + Gemv,

Source§

type Output = Vec<T>

The resulting type after applying the * operator.
Source§

fn mul(self, x: &dyn Vector<T>) -> Vec<T>

Performs the * operation. Read more
Source§

impl<'a, T> Mul<&'a dyn Vector<T>> for Trans<&'a dyn Vector<T>>
where T: Sized + Copy + Dot + Dotc,

Source§

type Output = T

The resulting type after applying the * operator.
Source§

fn mul(self, x: &dyn Vector<T>) -> T

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a dyn Vector<f32>> for f32

Source§

type Output = Vec<f32>

The resulting type after applying the * operator.
Source§

fn mul(self, x: &dyn Vector<f32>) -> Vec<f32>

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a dyn Vector<f64>> for f64

Source§

type Output = Vec<f64>

The resulting type after applying the * operator.
Source§

fn mul(self, x: &dyn Vector<f64>) -> Vec<f64>

Performs the * operation. Read more
Source§

impl<'a, T> Mul<T> for &'a dyn Vector<T>
where T: Sized + Copy + Scal,

Source§

type Output = Vec<T>

The resulting type after applying the * operator.
Source§

fn mul(self, alpha: T) -> Vec<T>

Performs the * operation. Read more
Source§

impl<'a, T> Mul<Trans<&'a dyn Vector<T>>> for &'a dyn Vector<T>
where T: Default + Ger + Gerc + Clone,

Source§

type Output = Mat<T>

The resulting type after applying the * operator.
Source§

fn mul(self, x: Trans<&dyn Vector<T>>) -> Mat<T>

Performs the * operation. Read more

Implementations on Foreign Types§

Source§

impl<T> Vector<T> for [T]

Source§

fn len(&self) -> u32

Source§

fn as_ptr(&self) -> *const T

Source§

fn as_mut_ptr(&mut self) -> *mut T

Source§

impl<T> Vector<T> for Vec<T>

Source§

fn len(&self) -> u32

Source§

fn as_ptr(&self) -> *const T

Source§

fn as_mut_ptr(&mut self) -> *mut T

Implementors§