Type Alias V
pub type V = NalgebraVec<f64>;
Expand description
Type alias for state vector type used in simulations
Aliased Type§
pub struct V { /* private fields */ }
Trait Implementations
§impl<T> AddAssign<&NalgebraVec<T>> for NalgebraVec<T>where
T: Scalar,
impl<T> AddAssign<&NalgebraVec<T>> for NalgebraVec<T>where
T: Scalar,
§fn add_assign(&mut self, rhs: &NalgebraVec<T>)
fn add_assign(&mut self, rhs: &NalgebraVec<T>)
Performs the
+=
operation. Read more§impl<T> AddAssign<&NalgebraVecRef<'_, T>> for NalgebraVec<T>where
T: Scalar,
impl<T> AddAssign<&NalgebraVecRef<'_, T>> for NalgebraVec<T>where
T: Scalar,
§fn add_assign(&mut self, rhs: &NalgebraVecRef<'_, T>)
fn add_assign(&mut self, rhs: &NalgebraVecRef<'_, T>)
Performs the
+=
operation. Read more§impl<T> AddAssign<NalgebraVecRef<'_, T>> for NalgebraVec<T>where
T: Scalar,
impl<T> AddAssign<NalgebraVecRef<'_, T>> for NalgebraVec<T>where
T: Scalar,
§fn add_assign(&mut self, rhs: NalgebraVecRef<'_, T>)
fn add_assign(&mut self, rhs: NalgebraVecRef<'_, T>)
Performs the
+=
operation. Read more§impl<T> AddAssign for NalgebraVec<T>where
T: Scalar,
impl<T> AddAssign for NalgebraVec<T>where
T: Scalar,
§fn add_assign(&mut self, rhs: NalgebraVec<T>)
fn add_assign(&mut self, rhs: NalgebraVec<T>)
Performs the
+=
operation. Read more§impl<T> From<Matrix<T, Dyn, Const<1>, VecStorage<T, Dyn, Const<1>>>> for NalgebraVec<T>where
T: Scalar,
impl<T> From<Matrix<T, Dyn, Const<1>, VecStorage<T, Dyn, Const<1>>>> for NalgebraVec<T>where
T: Scalar,
§impl<'a, T> MulAssign<Scale<T>> for NalgebraVec<T>where
T: Scalar,
impl<'a, T> MulAssign<Scale<T>> for NalgebraVec<T>where
T: Scalar,
§fn mul_assign(&mut self, rhs: Scale<T>)
fn mul_assign(&mut self, rhs: Scale<T>)
Performs the
*=
operation. Read more§impl<T> SubAssign<&NalgebraVec<T>> for NalgebraVec<T>where
T: Scalar,
impl<T> SubAssign<&NalgebraVec<T>> for NalgebraVec<T>where
T: Scalar,
§fn sub_assign(&mut self, rhs: &NalgebraVec<T>)
fn sub_assign(&mut self, rhs: &NalgebraVec<T>)
Performs the
-=
operation. Read more§impl<T> SubAssign<&NalgebraVecRef<'_, T>> for NalgebraVec<T>where
T: Scalar,
impl<T> SubAssign<&NalgebraVecRef<'_, T>> for NalgebraVec<T>where
T: Scalar,
§fn sub_assign(&mut self, rhs: &NalgebraVecRef<'_, T>)
fn sub_assign(&mut self, rhs: &NalgebraVecRef<'_, T>)
Performs the
-=
operation. Read more§impl<T> SubAssign<NalgebraVecRef<'_, T>> for NalgebraVec<T>where
T: Scalar,
impl<T> SubAssign<NalgebraVecRef<'_, T>> for NalgebraVec<T>where
T: Scalar,
§fn sub_assign(&mut self, rhs: NalgebraVecRef<'_, T>)
fn sub_assign(&mut self, rhs: NalgebraVecRef<'_, T>)
Performs the
-=
operation. Read more§impl<T> SubAssign for NalgebraVec<T>where
T: Scalar,
impl<T> SubAssign for NalgebraVec<T>where
T: Scalar,
§fn sub_assign(&mut self, rhs: NalgebraVec<T>)
fn sub_assign(&mut self, rhs: NalgebraVec<T>)
Performs the
-=
operation. Read more§impl<T> Vector for NalgebraVec<T>where
T: Scalar,
impl<T> Vector for NalgebraVec<T>where
T: Scalar,
type View<'a> = NalgebraVecRef<'a, T>
type ViewMut<'a> = NalgebraVecMut<'a, T>
type Index = NalgebraIndex
fn inner_mut(&mut self) -> &mut <NalgebraVec<T> as VectorCommon>::Inner
§fn get_index(&self, index: usize) -> <NalgebraVec<T> as VectorCommon>::T
fn get_index(&self, index: usize) -> <NalgebraVec<T> as VectorCommon>::T
get the value at index
index
, might be slower than using Index
if the vector is not on the host§fn set_index(
&mut self,
index: usize,
value: <NalgebraVec<T> as VectorCommon>::T,
)
fn set_index( &mut self, index: usize, value: <NalgebraVec<T> as VectorCommon>::T, )
set the value at index
index
to value
, might be slower than using IndexMut
if the vector is not on the host§fn squared_norm(
&self,
y: &NalgebraVec<T>,
atol: &NalgebraVec<T>,
rtol: <NalgebraVec<T> as VectorCommon>::T,
) -> <NalgebraVec<T> as VectorCommon>::T
fn squared_norm( &self, y: &NalgebraVec<T>, atol: &NalgebraVec<T>, rtol: <NalgebraVec<T> as VectorCommon>::T, ) -> <NalgebraVec<T> as VectorCommon>::T
returns \sum_i (x_i / (|y_i| * rtol + atol_i))^2
§fn as_view_mut(&mut self) -> <NalgebraVec<T> as Vector>::ViewMut<'_>
fn as_view_mut(&mut self) -> <NalgebraVec<T> as Vector>::ViewMut<'_>
create a mutable view of the vector
§fn copy_from_view(&mut self, other: &<NalgebraVec<T> as Vector>::View<'_>)
fn copy_from_view(&mut self, other: &<NalgebraVec<T> as Vector>::View<'_>)
copy the values from
other
to self
§fn from_element(
nstates: usize,
value: T,
ctx: <NalgebraVec<T> as VectorCommon>::C,
) -> NalgebraVec<T>
fn from_element( nstates: usize, value: T, ctx: <NalgebraVec<T> as VectorCommon>::C, ) -> NalgebraVec<T>
create a vector of size
nstates
with all elements set to value
§fn from_vec(
vec: Vec<T>,
ctx: <NalgebraVec<T> as VectorCommon>::C,
) -> NalgebraVec<T>
fn from_vec( vec: Vec<T>, ctx: <NalgebraVec<T> as VectorCommon>::C, ) -> NalgebraVec<T>
create a vector from a Vec
TODO: would prefer to use From trait but not implemented for faer::Col
§fn from_slice(
slice: &[T],
ctx: <NalgebraVec<T> as VectorCommon>::C,
) -> NalgebraVec<T>
fn from_slice( slice: &[T], ctx: <NalgebraVec<T> as VectorCommon>::C, ) -> NalgebraVec<T>
create a vector from a slice
§fn clone_as_vec(&self) -> Vec<<NalgebraVec<T> as VectorCommon>::T>
fn clone_as_vec(&self) -> Vec<<NalgebraVec<T> as VectorCommon>::T>
convert the vector to a Vec
TODO: would prefer to use Into trait but not implemented for faer::Col
§fn zeros(
nstates: usize,
ctx: <NalgebraVec<T> as VectorCommon>::C,
) -> NalgebraVec<T>
fn zeros( nstates: usize, ctx: <NalgebraVec<T> as VectorCommon>::C, ) -> NalgebraVec<T>
create a vector of size
nstates
with all elements set to zero§fn axpy(&mut self, alpha: T, x: &NalgebraVec<T>, beta: T)
fn axpy(&mut self, alpha: T, x: &NalgebraVec<T>, beta: T)
axpy operation: self = alpha * x + beta * self
§fn axpy_v(
&mut self,
alpha: <NalgebraVec<T> as VectorCommon>::T,
x: &<NalgebraVec<T> as Vector>::View<'_>,
beta: <NalgebraVec<T> as VectorCommon>::T,
)
fn axpy_v( &mut self, alpha: <NalgebraVec<T> as VectorCommon>::T, x: &<NalgebraVec<T> as Vector>::View<'_>, beta: <NalgebraVec<T> as VectorCommon>::T, )
axpy operation: self = alpha * x + beta * self
§fn component_div_assign(&mut self, other: &NalgebraVec<T>)
fn component_div_assign(&mut self, other: &NalgebraVec<T>)
element-wise division
§fn component_mul_assign(&mut self, other: &NalgebraVec<T>)
fn component_mul_assign(&mut self, other: &NalgebraVec<T>)
element-wise multiplication
§fn root_finding(
&self,
g1: &NalgebraVec<T>,
) -> (bool, <NalgebraVec<T> as VectorCommon>::T, i32)
fn root_finding( &self, g1: &NalgebraVec<T>, ) -> (bool, <NalgebraVec<T> as VectorCommon>::T, i32)
§fn assign_at_indices(
&mut self,
indices: &<NalgebraVec<T> as Vector>::Index,
value: <NalgebraVec<T> as VectorCommon>::T,
)
fn assign_at_indices( &mut self, indices: &<NalgebraVec<T> as Vector>::Index, value: <NalgebraVec<T> as VectorCommon>::T, )
assign
value
to the elements of self
at the indices specified by indices
i.e. self[indices[i]] = value
for all i§fn copy_from_indices(
&mut self,
other: &NalgebraVec<T>,
indices: &<NalgebraVec<T> as Vector>::Index,
)
fn copy_from_indices( &mut self, other: &NalgebraVec<T>, indices: &<NalgebraVec<T> as Vector>::Index, )
copy from
other
at the indices specified by indices
generaly self
and other
have the same length
i.e. self[indices[i]] = other[indices[i]]
for all i§fn gather(
&mut self,
other: &NalgebraVec<T>,
indices: &<NalgebraVec<T> as Vector>::Index,
)
fn gather( &mut self, other: &NalgebraVec<T>, indices: &<NalgebraVec<T> as Vector>::Index, )
gather values from
other
at the indices specified by indices
i.e. self[i] = other[indices[i]]
for all i§fn scatter(
&self,
indices: &<NalgebraVec<T> as Vector>::Index,
other: &mut NalgebraVec<T>,
)
fn scatter( &self, indices: &<NalgebraVec<T> as Vector>::Index, other: &mut NalgebraVec<T>, )
scatter values from
self
to other
at the indices specified by indices
i.e. other[indices[i]] = self[i]
for all i§fn assert_eq_st(&self, other: &Self, tol: Self::T)
fn assert_eq_st(&self, other: &Self, tol: Self::T)
assert that
self
is equal to other
within a tolerance tol
§fn assert_eq_norm(
&self,
other: &Self,
atol: &Self,
rtol: Self::T,
factor: Self::T,
)
fn assert_eq_norm( &self, other: &Self, atol: &Self, rtol: Self::T, factor: Self::T, )
assert that
self
is equal to other
using the same norm used by the solvers§fn assert_eq(&self, other: &Self, tol: &Self)
fn assert_eq(&self, other: &Self, tol: &Self)
assert that
self
is equal to other
within a vector tolerance tol
fn assert_eq_vec(s: Vec<Self::T>, other: Vec<Self::T>, tol: Vec<Self::T>)
§impl<T> VectorCommon for NalgebraVec<T>where
T: Scalar,
impl<T> VectorCommon for NalgebraVec<T>where
T: Scalar,
§impl<T> VectorHost for NalgebraVec<T>where
T: Scalar,
impl<T> VectorHost for NalgebraVec<T>where
T: Scalar,
§fn as_slice(&self) -> &[<NalgebraVec<T> as VectorCommon>::T]
fn as_slice(&self) -> &[<NalgebraVec<T> as VectorCommon>::T]
get the vector as a slice
TODO: not compatible with gpu vectors? but used for diffsl api
§fn as_mut_slice(&mut self) -> &mut [<NalgebraVec<T> as VectorCommon>::T]
fn as_mut_slice(&mut self) -> &mut [<NalgebraVec<T> as VectorCommon>::T]
get the vector as a mut slice
TODO: not compatible with gpu vectors? but used for diffsl api