pub trait VecOps<T: ComplexFloat> {
// Required methods
fn add_to_scaled<Lx: Layout, Ly: Layout>(
&self,
alpha: T,
x: &DSlice<T, 1, Lx>,
y: &mut DSlice<T, 1, Ly>,
);
fn dot<Lx: Layout, Ly: Layout>(
&self,
x: &DSlice<T, 1, Lx>,
y: &DSlice<T, 1, Ly>,
) -> T;
fn dotc<Lx: Layout, Ly: Layout>(
&self,
x: &DSlice<T, 1, Lx>,
y: &DSlice<T, 1, Ly>,
) -> T;
fn norm2<Lx: Layout>(&self, x: &DSlice<T, 1, Lx>) -> T::Real;
fn norm1<Lx: Layout>(&self, x: &DSlice<T, 1, Lx>) -> T::Real
where T: ComplexFloat;
fn copy<Lx: Layout, Ly: Layout>(
&self,
x: &DSlice<T, 1, Lx>,
y: &mut DSlice<T, 1, Ly>,
);
fn scal<Lx: Layout>(&self, alpha: T, x: &mut DSlice<T, 1, Lx>);
fn swap<Lx: Layout, Ly: Layout>(
&self,
x: &mut DSlice<T, 1, Lx>,
y: &mut DSlice<T, 1, Ly>,
);
fn rot<Lx: Layout, Ly: Layout>(
&self,
x: &mut DSlice<T, 1, Lx>,
y: &mut DSlice<T, 1, Ly>,
c: T::Real,
s: T,
)
where T: ComplexFloat;
}Expand description
Vector operations and basic linear algebra utilities
Required Methods§
Sourcefn add_to_scaled<Lx: Layout, Ly: Layout>(
&self,
alpha: T,
x: &DSlice<T, 1, Lx>,
y: &mut DSlice<T, 1, Ly>,
)
fn add_to_scaled<Lx: Layout, Ly: Layout>( &self, alpha: T, x: &DSlice<T, 1, Lx>, y: &mut DSlice<T, 1, Ly>, )
Accumulate a scaled vector: y := α·x + y
Sourcefn dot<Lx: Layout, Ly: Layout>(
&self,
x: &DSlice<T, 1, Lx>,
y: &DSlice<T, 1, Ly>,
) -> T
fn dot<Lx: Layout, Ly: Layout>( &self, x: &DSlice<T, 1, Lx>, y: &DSlice<T, 1, Ly>, ) -> T
Dot product: ∑xᵢyᵢ
Sourcefn dotc<Lx: Layout, Ly: Layout>(
&self,
x: &DSlice<T, 1, Lx>,
y: &DSlice<T, 1, Ly>,
) -> T
fn dotc<Lx: Layout, Ly: Layout>( &self, x: &DSlice<T, 1, Lx>, y: &DSlice<T, 1, Ly>, ) -> T
Conjugated dot product: ∑(xᵢ * conj(yᵢ))
Sourcefn norm1<Lx: Layout>(&self, x: &DSlice<T, 1, Lx>) -> T::Realwhere
T: ComplexFloat,
fn norm1<Lx: Layout>(&self, x: &DSlice<T, 1, Lx>) -> T::Realwhere
T: ComplexFloat,
L1 norm: ∑|xᵢ|
Sourcefn copy<Lx: Layout, Ly: Layout>(
&self,
x: &DSlice<T, 1, Lx>,
y: &mut DSlice<T, 1, Ly>,
)
fn copy<Lx: Layout, Ly: Layout>( &self, x: &DSlice<T, 1, Lx>, y: &mut DSlice<T, 1, Ly>, )
Copy vector: y := x (TODO)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.