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> Add<&NalgebraVec<T>> for NalgebraVec<T>
where T: Scalar,

§

type Output = NalgebraVec<T>

The resulting type after applying the + operator.
§

fn add( self, rhs: &NalgebraVec<T>, ) -> <NalgebraVec<T> as Add<&NalgebraVec<T>>>::Output

Performs the + operation. Read more
§

impl<T> Add<&NalgebraVecRef<'_, T>> for NalgebraVec<T>
where T: Scalar,

§

type Output = NalgebraVec<T>

The resulting type after applying the + operator.
§

fn add( self, rhs: &NalgebraVecRef<'_, T>, ) -> <NalgebraVec<T> as Add<&NalgebraVecRef<'_, T>>>::Output

Performs the + operation. Read more
§

impl<T> Add<NalgebraVecRef<'_, T>> for NalgebraVec<T>
where T: Scalar,

§

type Output = NalgebraVec<T>

The resulting type after applying the + operator.
§

fn add( self, rhs: NalgebraVecRef<'_, T>, ) -> <NalgebraVec<T> as Add<NalgebraVecRef<'_, T>>>::Output

Performs the + operation. Read more
§

impl<T> Add for NalgebraVec<T>
where T: Scalar,

§

type Output = NalgebraVec<T>

The resulting type after applying the + operator.
§

fn add(self, rhs: NalgebraVec<T>) -> <NalgebraVec<T> as Add>::Output

Performs the + operation. Read more
§

impl<T> AddAssign<&NalgebraVec<T>> for NalgebraVec<T>
where T: Scalar,

§

fn add_assign(&mut self, rhs: &NalgebraVec<T>)

Performs the += operation. Read more
§

impl<T> AddAssign<&NalgebraVecRef<'_, T>> for NalgebraVec<T>
where T: Scalar,

§

fn add_assign(&mut self, rhs: &NalgebraVecRef<'_, T>)

Performs the += operation. Read more
§

impl<T> AddAssign<NalgebraVecRef<'_, T>> for NalgebraVec<T>
where T: Scalar,

§

fn add_assign(&mut self, rhs: NalgebraVecRef<'_, T>)

Performs the += operation. Read more
§

impl<T> AddAssign for NalgebraVec<T>
where T: Scalar,

§

fn add_assign(&mut self, rhs: NalgebraVec<T>)

Performs the += operation. Read more
§

impl<T> Clone for NalgebraVec<T>
where T: Clone + Scalar,

§

fn clone(&self) -> NalgebraVec<T>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<T> Debug for NalgebraVec<T>
where T: Debug + Scalar,

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<T> DefaultDenseMatrix for NalgebraVec<T>
where T: Scalar,

§

type M = NalgebraMat<T>

§

impl<'a, T> Div<Scale<T>> for NalgebraVec<T>
where T: Scalar,

§

type Output = NalgebraVec<T>

The resulting type after applying the / operator.
§

fn div(self, rhs: Scale<T>) -> <NalgebraVec<T> as Div<Scale<T>>>::Output

Performs the / operation. Read more
§

impl<T> From<Matrix<T, Dyn, Const<1>, VecStorage<T, Dyn, Const<1>>>> for NalgebraVec<T>
where T: Scalar,

§

fn from( data: Matrix<T, Dyn, Const<1>, VecStorage<T, Dyn, Const<1>>>, ) -> NalgebraVec<T>

Converts to this type from the input type.
§

impl<T> Index<usize> for NalgebraVec<T>
where T: Scalar,

§

type Output = T

The returned type after indexing.
§

fn index(&self, index: usize) -> &<NalgebraVec<T> as Index<usize>>::Output

Performs the indexing (container[index]) operation. Read more
§

impl<T> IndexMut<usize> for NalgebraVec<T>
where T: Scalar,

§

fn index_mut( &mut self, index: usize, ) -> &mut <NalgebraVec<T> as Index<usize>>::Output

Performs the mutable indexing (container[index]) operation. Read more
§

impl<T> Mul<Scale<T>> for NalgebraVec<T>
where T: Scalar,

§

type Output = NalgebraVec<T>

The resulting type after applying the * operator.
§

fn mul(self, rhs: Scale<T>) -> <NalgebraVec<T> as Mul<Scale<T>>>::Output

Performs the * operation. Read more
§

impl<'a, T> MulAssign<Scale<T>> for NalgebraVec<T>
where T: Scalar,

§

fn mul_assign(&mut self, rhs: Scale<T>)

Performs the *= operation. Read more
§

impl<T> PartialEq for NalgebraVec<T>
where T: PartialEq + Scalar,

§

fn eq(&self, other: &NalgebraVec<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl State for NalgebraVec<f64>

§

fn add_bolus(&mut self, input: usize, amount: f64)

Add a bolus dose to the state at the specified input compartment. Read more
§

impl<T> Sub<&NalgebraVec<T>> for NalgebraVec<T>
where T: Scalar,

§

type Output = NalgebraVec<T>

The resulting type after applying the - operator.
§

fn sub( self, rhs: &NalgebraVec<T>, ) -> <NalgebraVec<T> as Sub<&NalgebraVec<T>>>::Output

Performs the - operation. Read more
§

impl<T> Sub<&NalgebraVecRef<'_, T>> for NalgebraVec<T>
where T: Scalar,

§

type Output = NalgebraVec<T>

The resulting type after applying the - operator.
§

fn sub( self, rhs: &NalgebraVecRef<'_, T>, ) -> <NalgebraVec<T> as Sub<&NalgebraVecRef<'_, T>>>::Output

Performs the - operation. Read more
§

impl<T> Sub<NalgebraVecRef<'_, T>> for NalgebraVec<T>
where T: Scalar,

§

type Output = NalgebraVec<T>

The resulting type after applying the - operator.
§

fn sub( self, rhs: NalgebraVecRef<'_, T>, ) -> <NalgebraVec<T> as Sub<NalgebraVecRef<'_, T>>>::Output

Performs the - operation. Read more
§

impl<T> Sub for NalgebraVec<T>
where T: Scalar,

§

type Output = NalgebraVec<T>

The resulting type after applying the - operator.
§

fn sub(self, rhs: NalgebraVec<T>) -> <NalgebraVec<T> as Sub>::Output

Performs the - operation. Read more
§

impl<T> SubAssign<&NalgebraVec<T>> for NalgebraVec<T>
where T: Scalar,

§

fn sub_assign(&mut self, rhs: &NalgebraVec<T>)

Performs the -= operation. Read more
§

impl<T> SubAssign<&NalgebraVecRef<'_, T>> for NalgebraVec<T>
where T: Scalar,

§

fn sub_assign(&mut self, rhs: &NalgebraVecRef<'_, T>)

Performs the -= operation. Read more
§

impl<T> SubAssign<NalgebraVecRef<'_, T>> for NalgebraVec<T>
where T: Scalar,

§

fn sub_assign(&mut self, rhs: NalgebraVecRef<'_, T>)

Performs the -= operation. Read more
§

impl<T> SubAssign for NalgebraVec<T>
where T: Scalar,

§

fn sub_assign(&mut self, rhs: NalgebraVec<T>)

Performs the -= operation. Read more
§

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 len(&self) -> usize

get the length of the vector
§

fn inner_mut(&mut self) -> &mut <NalgebraVec<T> as VectorCommon>::Inner

§

fn context(&self) -> &<NalgebraVec<T> as VectorCommon>::C

get the context
§

fn norm(&self, k: i32) -> <NalgebraVec<T> as VectorCommon>::T

returns (\sum_i (x_i)^k)^(1/k)
§

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, )

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

returns \sum_i (x_i / (|y_i| * rtol + atol_i))^2
§

fn as_view(&self) -> <NalgebraVec<T> as Vector>::View<'_>

create a view of the vector
§

fn as_view_mut(&mut self) -> <NalgebraVec<T> as Vector>::ViewMut<'_>

create a mutable view of the vector
§

fn copy_from(&mut self, other: &NalgebraVec<T>)

copy the values from other to self
§

fn fill(&mut self, value: <NalgebraVec<T> as VectorCommon>::T)

fill the vector with value
§

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>

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>

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>

create a vector from a slice
§

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>

create a vector of size nstates with all elements set to zero
§

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, )

axpy operation: self = alpha * x + beta * self
§

fn component_div_assign(&mut self, other: &NalgebraVec<T>)

element-wise division
§

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)

given two vectors g0=self and g1, return: Read more
§

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, )

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, )

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>, )

scatter values from self to other at the indices specified by indices i.e. other[indices[i]] = self[i] for all i
§

fn is_empty(&self) -> bool

check if the vector is empty
§

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, )

assert that self is equal to other using the same norm used by the solvers
§

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,

§

type T = T

§

type C = NalgebraContext

§

type Inner = Matrix<T, Dyn, Const<1>, VecStorage<T, Dyn, Const<1>>>

§

fn inner(&self) -> &<NalgebraVec<T> as VectorCommon>::Inner

§

impl<T> VectorHost for NalgebraVec<T>
where T: Scalar,

§

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]

get the vector as a mut slice TODO: not compatible with gpu vectors? but used for diffsl api
§

impl<T> StructuralPartialEq for NalgebraVec<T>
where T: Scalar,