Trait rust_blas::vector::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,

§

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>

§

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

§

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

§

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,

§

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,

§

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

§

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

§

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,

§

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,

§

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§