pub struct Vector<K> {
pub _d: Vec<K>,
}Fields§
§_d: Vec<K>Implementations§
Source§impl<K: Scalar> Vector<K>
impl<K: Scalar> Vector<K>
pub fn zero(size: usize) -> Self
pub fn size(&self) -> usize
pub fn first(&self) -> Option<&K>
pub fn is_empty(&self) -> bool
pub fn add(&mut self, v: &Vector<K>)
pub fn sub(&mut self, vec: &Vector<K>)
pub fn scl(&mut self, a: K)
pub fn norm_1(&self) -> K::AbsOutput
pub fn norm(&self) -> K::AbsOutput
pub fn norm_inf(&self) -> K::AbsOutput
Trait Implementations§
Source§impl<K: Scalar> AddAssign<&Vector<K>> for Vector<K>
impl<K: Scalar> AddAssign<&Vector<K>> for Vector<K>
Source§fn add_assign(&mut self, rhs: &Vector<K>)
fn add_assign(&mut self, rhs: &Vector<K>)
Performs the
+= operation. Read moreSource§impl<K: Scalar + MulAssign<U>, U: Scalar> MulAssign<&U> for Vector<K>
impl<K: Scalar + MulAssign<U>, U: Scalar> MulAssign<&U> for Vector<K>
Source§fn mul_assign(&mut self, a: &U)
fn mul_assign(&mut self, a: &U)
Performs the
*= operation. Read moreAuto Trait Implementations§
impl<K> Freeze for Vector<K>
impl<K> RefUnwindSafe for Vector<K>where
K: RefUnwindSafe,
impl<K> Send for Vector<K>where
K: Send,
impl<K> Sync for Vector<K>where
K: Sync,
impl<K> Unpin for Vector<K>where
K: Unpin,
impl<K> UnwindSafe for Vector<K>where
K: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more