pub struct Vector<T> { /* private fields */ }Expand description
The Vector struct.
Can be instantiated with any type.
Implementations§
Source§impl<T> Vector<T>
impl<T> Vector<T>
Sourcepub fn new<U: Into<Vec<T>>>(data: U) -> Vector<T>
pub fn new<U: Into<Vec<T>>>(data: U) -> Vector<T>
Constructor for Vector struct.
Requires the vector data.
§Examples
use rulinalg::vector::Vector;
let vec = Vector::new(vec![1.0,2.0,3.0,4.0]);Sourcepub fn from_fn<F>(size: usize, f: F) -> Vector<T>
pub fn from_fn<F>(size: usize, f: F) -> Vector<T>
Constructor for Vector struct that takes a function f
and constructs a new vector such that V_i = f(i),
where i is the index.
§Examples
use rulinalg::vector::Vector;
let v = Vector::from_fn(4, |x| x * 3);
assert_eq!(v, vector![0, 3, 6, 9]);Sourcepub fn iter_mut(&mut self) -> IterMut<'_, T>
pub fn iter_mut(&mut self) -> IterMut<'_, T>
Returns an iterator over mutable references to the Vector’s data.
Sourcepub unsafe fn get_unchecked(&self, index: usize) -> &T
pub unsafe fn get_unchecked(&self, index: usize) -> &T
Returns a pointer to the element at the given index, without doing bounds checking.
Sourcepub unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut T
pub unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut T
Returns an unsafe mutable pointer to the element at the given index, without doing bounds checking.
Source§impl<T: Copy + PartialOrd> Vector<T>
impl<T: Copy + PartialOrd> Vector<T>
Sourcepub fn argmax(&self) -> (usize, T)
pub fn argmax(&self) -> (usize, T)
Find the argmax of the Vector.
Returns the index of the largest value in the vector.
§Examples
use rulinalg::vector::Vector;
let a = vector![1.0,2.0,0.0,5.0];
let b = a.argmax();
assert_eq!(b.0, 3);
assert_eq!(b.1, 5.0);Sourcepub fn argmin(&self) -> (usize, T)
pub fn argmin(&self) -> (usize, T)
Find the argmin of the Vector.
Returns the index of the smallest value in the vector.
§Examples
use rulinalg::vector::Vector;
let a = vector![1.0, 2.0, 0.0, 5.0];
let b = a.argmin();
assert_eq!(b.0, 2);
assert_eq!(b.1, 0.0);Sourcepub fn select(&self, idxs: &[usize]) -> Vector<T>
pub fn select(&self, idxs: &[usize]) -> Vector<T>
Select elements from the Vector and form a new Vector from them.
§Examples
use rulinalg::vector::Vector;
let a = vector![1.0, 2.0, 3.0, 4.0, 5.0];
let a_lower = a.select(&[2, 3, 4]);
// Prints [3,4,5]
assert_eq!(a_lower, vector![3.0, 4.0, 5.0]);Source§impl<T: Float> Vector<T>
impl<T: Float> Vector<T>
Sourcepub fn norm<N: VectorNorm<T>>(&self, norm: N) -> T
pub fn norm<N: VectorNorm<T>>(&self, norm: N) -> T
Compute vector norm for vector.
§Examples
use rulinalg::vector::Vector;
use rulinalg::norm::Euclidean;
let a = vector![3.0, 4.0];
let c = a.norm(Euclidean);
assert_eq!(c, 5.0);Sourcepub fn metric<M: VectorMetric<T>>(&self, v: &Vector<T>, m: M) -> T
pub fn metric<M: VectorMetric<T>>(&self, v: &Vector<T>, m: M) -> T
Compute metric distance between two vectors.
§Examples
use rulinalg::vector::Vector;
use rulinalg::norm::Euclidean;
let a = vector![3.0, 4.0];
let b = vector![0.0, 8.0];
// Compute the square root of the sum of
// elementwise squared-differences
let c = a.metric(&b, Euclidean);
assert_eq!(c, 5.0);Trait Implementations§
Source§impl<'a, 'b, T: Copy + Add<T, Output = T>> Add<&'b T> for &'a Vector<T>
Scalar
addition
with Vector allocating new memory.
impl<'a, 'b, T: Copy + Add<T, Output = T>> Add<&'b T> for &'a Vector<T>
Scalar addition with Vector allocating new memory.
Source§impl<'a, T: Copy + Add<T, Output = T>> Add<&'a T> for Vector<T>
Scalar
addition
with Vector reusing current memory.
impl<'a, T: Copy + Add<T, Output = T>> Add<&'a T> for Vector<T>
Scalar addition with Vector reusing current memory.
Source§impl<'a, 'b, T: Copy + Add<T, Output = T>> Add<&'b Vector<T>> for &'a Vector<T>
Vector
addition
with Vector allocating new memory.
impl<'a, 'b, T: Copy + Add<T, Output = T>> Add<&'b Vector<T>> for &'a Vector<T>
Vector addition with Vector allocating new memory.
Source§impl<'a, T: Copy + Add<T, Output = T>> Add<&'a Vector<T>> for Vector<T>
Vector
addition
with Vector reusing current memory.
impl<'a, T: Copy + Add<T, Output = T>> Add<&'a Vector<T>> for Vector<T>
Vector addition with Vector reusing current memory.
Source§impl<'a, T: Copy + Add<T, Output = T>> Add<T> for &'a Vector<T>
Scalar
addition
with Vector allocating new memory.
impl<'a, T: Copy + Add<T, Output = T>> Add<T> for &'a Vector<T>
Scalar addition with Vector allocating new memory.
Source§impl<T: Copy + Add<T, Output = T>> Add<T> for Vector<T>
Scalar
addition
with Vector reusing current memory.
impl<T: Copy + Add<T, Output = T>> Add<T> for Vector<T>
Scalar addition with Vector reusing current memory.
Source§impl<'a, T: Copy + Add<T, Output = T>> Add<Vector<T>> for &'a Vector<T>
Vector
addition
with Vector reusing current memory.
impl<'a, T: Copy + Add<T, Output = T>> Add<Vector<T>> for &'a Vector<T>
Vector addition with Vector reusing current memory.
Source§impl<T: Copy + Add<T, Output = T>> Add for Vector<T>
Vector
addition
with Vector reusing current memory.
impl<T: Copy + Add<T, Output = T>> Add for Vector<T>
Vector addition with Vector reusing current memory.
Source§impl<'a, T: Copy + Add<T, Output = T>> AddAssign<&'a T> for Vector<T>
Performs
addition
assignment between a vector and a scalar.
impl<'a, T: Copy + Add<T, Output = T>> AddAssign<&'a T> for Vector<T>
Performs addition assignment between a vector and a scalar.
Source§fn add_assign(&mut self, _rhs: &T)
fn add_assign(&mut self, _rhs: &T)
+= operation. Read moreSource§impl<'a, T: Copy + Add<T, Output = T>> AddAssign<&'a Vector<T>> for Vector<T>
Performs elementwise
addition
assignment between two vectors.
impl<'a, T: Copy + Add<T, Output = T>> AddAssign<&'a Vector<T>> for Vector<T>
Performs elementwise addition assignment between two vectors.
Source§fn add_assign(&mut self, _rhs: &Vector<T>)
fn add_assign(&mut self, _rhs: &Vector<T>)
+= operation. Read moreSource§impl<T: Copy + Add<T, Output = T>> AddAssign<T> for Vector<T>
Performs
addition
assignment between a vector and a scalar.
impl<T: Copy + Add<T, Output = T>> AddAssign<T> for Vector<T>
Performs addition assignment between a vector and a scalar.
Source§fn add_assign(&mut self, _rhs: T)
fn add_assign(&mut self, _rhs: T)
+= operation. Read moreSource§impl<T: Copy + Add<T, Output = T>> AddAssign for Vector<T>
Performs elementwise
addition
assignment between two vectors.
impl<T: Copy + Add<T, Output = T>> AddAssign for Vector<T>
Performs elementwise addition assignment between two vectors.
Source§fn add_assign(&mut self, _rhs: Vector<T>)
fn add_assign(&mut self, _rhs: Vector<T>)
+= operation. Read moreSource§impl<'a, 'b, T: Copy + BitAnd<T, Output = T>> BitAnd<&'b T> for &'a Vector<T>
Scalar
bitwise-and
with Vector allocating new memory.
impl<'a, 'b, T: Copy + BitAnd<T, Output = T>> BitAnd<&'b T> for &'a Vector<T>
Scalar bitwise-and with Vector allocating new memory.
Source§impl<'a, T: Copy + BitAnd<T, Output = T>> BitAnd<&'a T> for Vector<T>
Scalar
bitwise-and
with Vector reusing current memory.
impl<'a, T: Copy + BitAnd<T, Output = T>> BitAnd<&'a T> for Vector<T>
Scalar bitwise-and with Vector reusing current memory.
Source§impl<'a, 'b, T: Copy + BitAnd<T, Output = T>> BitAnd<&'b Vector<T>> for &'a Vector<T>
Vector
bitwise-and
with Vector allocating new memory.
impl<'a, 'b, T: Copy + BitAnd<T, Output = T>> BitAnd<&'b Vector<T>> for &'a Vector<T>
Vector bitwise-and with Vector allocating new memory.
Source§impl<'a, T: Copy + BitAnd<T, Output = T>> BitAnd<&'a Vector<T>> for Vector<T>
Vector
bitwise-and
with Vector reusing current memory.
impl<'a, T: Copy + BitAnd<T, Output = T>> BitAnd<&'a Vector<T>> for Vector<T>
Vector bitwise-and with Vector reusing current memory.
Source§impl<'a, T: Copy + BitAnd<T, Output = T>> BitAnd<T> for &'a Vector<T>
Scalar
bitwise-and
with Vector allocating new memory.
impl<'a, T: Copy + BitAnd<T, Output = T>> BitAnd<T> for &'a Vector<T>
Scalar bitwise-and with Vector allocating new memory.
Source§impl<T: Copy + BitAnd<T, Output = T>> BitAnd<T> for Vector<T>
Scalar
bitwise-and
with Vector reusing current memory.
impl<T: Copy + BitAnd<T, Output = T>> BitAnd<T> for Vector<T>
Scalar bitwise-and with Vector reusing current memory.
Source§impl<'a, T: Copy + BitAnd<T, Output = T>> BitAnd<Vector<T>> for &'a Vector<T>
Vector
bitwise-and
with Vector reusing current memory.
impl<'a, T: Copy + BitAnd<T, Output = T>> BitAnd<Vector<T>> for &'a Vector<T>
Vector bitwise-and with Vector reusing current memory.
Source§impl<T: Copy + BitAnd<T, Output = T>> BitAnd for Vector<T>
Vector
bitwise-and
with Vector reusing current memory.
impl<T: Copy + BitAnd<T, Output = T>> BitAnd for Vector<T>
Vector bitwise-and with Vector reusing current memory.
Source§impl<'a, T: Copy + BitAnd<T, Output = T>> BitAndAssign<&'a T> for Vector<T>
Performs
bitwise-and
assignment between a vector and a scalar.
impl<'a, T: Copy + BitAnd<T, Output = T>> BitAndAssign<&'a T> for Vector<T>
Performs bitwise-and assignment between a vector and a scalar.
Source§fn bitand_assign(&mut self, _rhs: &T)
fn bitand_assign(&mut self, _rhs: &T)
&= operation. Read moreSource§impl<'a, T: Copy + BitAnd<T, Output = T>> BitAndAssign<&'a Vector<T>> for Vector<T>
Performs elementwise
bitwise-and
assignment between two vectors.
impl<'a, T: Copy + BitAnd<T, Output = T>> BitAndAssign<&'a Vector<T>> for Vector<T>
Performs elementwise bitwise-and assignment between two vectors.
Source§fn bitand_assign(&mut self, _rhs: &Vector<T>)
fn bitand_assign(&mut self, _rhs: &Vector<T>)
&= operation. Read moreSource§impl<T: Copy + BitAnd<T, Output = T>> BitAndAssign<T> for Vector<T>
Performs
bitwise-and
assignment between a vector and a scalar.
impl<T: Copy + BitAnd<T, Output = T>> BitAndAssign<T> for Vector<T>
Performs bitwise-and assignment between a vector and a scalar.
Source§fn bitand_assign(&mut self, _rhs: T)
fn bitand_assign(&mut self, _rhs: T)
&= operation. Read moreSource§impl<T: Copy + BitAnd<T, Output = T>> BitAndAssign for Vector<T>
Performs elementwise
bitwise-and
assignment between two vectors.
impl<T: Copy + BitAnd<T, Output = T>> BitAndAssign for Vector<T>
Performs elementwise bitwise-and assignment between two vectors.
Source§fn bitand_assign(&mut self, _rhs: Vector<T>)
fn bitand_assign(&mut self, _rhs: Vector<T>)
&= operation. Read moreSource§impl<'a, 'b, T: Copy + BitOr<T, Output = T>> BitOr<&'b T> for &'a Vector<T>
Scalar
bitwise-or
with Vector allocating new memory.
impl<'a, 'b, T: Copy + BitOr<T, Output = T>> BitOr<&'b T> for &'a Vector<T>
Scalar bitwise-or with Vector allocating new memory.
Source§impl<'a, T: Copy + BitOr<T, Output = T>> BitOr<&'a T> for Vector<T>
Scalar
bitwise-or
with Vector reusing current memory.
impl<'a, T: Copy + BitOr<T, Output = T>> BitOr<&'a T> for Vector<T>
Scalar bitwise-or with Vector reusing current memory.
Source§impl<'a, 'b, T: Copy + BitOr<T, Output = T>> BitOr<&'b Vector<T>> for &'a Vector<T>
Vector
bitwise-or
with Vector allocating new memory.
impl<'a, 'b, T: Copy + BitOr<T, Output = T>> BitOr<&'b Vector<T>> for &'a Vector<T>
Vector bitwise-or with Vector allocating new memory.
Source§impl<'a, T: Copy + BitOr<T, Output = T>> BitOr<&'a Vector<T>> for Vector<T>
Vector
bitwise-or
with Vector reusing current memory.
impl<'a, T: Copy + BitOr<T, Output = T>> BitOr<&'a Vector<T>> for Vector<T>
Vector bitwise-or with Vector reusing current memory.
Source§impl<'a, T: Copy + BitOr<T, Output = T>> BitOr<T> for &'a Vector<T>
Scalar
bitwise-or
with Vector allocating new memory.
impl<'a, T: Copy + BitOr<T, Output = T>> BitOr<T> for &'a Vector<T>
Scalar bitwise-or with Vector allocating new memory.
Source§impl<T: Copy + BitOr<T, Output = T>> BitOr<T> for Vector<T>
Scalar
bitwise-or
with Vector reusing current memory.
impl<T: Copy + BitOr<T, Output = T>> BitOr<T> for Vector<T>
Scalar bitwise-or with Vector reusing current memory.
Source§impl<'a, T: Copy + BitOr<T, Output = T>> BitOr<Vector<T>> for &'a Vector<T>
Vector
bitwise-or
with Vector reusing current memory.
impl<'a, T: Copy + BitOr<T, Output = T>> BitOr<Vector<T>> for &'a Vector<T>
Vector bitwise-or with Vector reusing current memory.
Source§impl<T: Copy + BitOr<T, Output = T>> BitOr for Vector<T>
Vector
bitwise-or
with Vector reusing current memory.
impl<T: Copy + BitOr<T, Output = T>> BitOr for Vector<T>
Vector bitwise-or with Vector reusing current memory.
Source§impl<'a, T: Copy + BitOr<T, Output = T>> BitOrAssign<&'a T> for Vector<T>
Performs
bitwise-or
assignment between a vector and a scalar.
impl<'a, T: Copy + BitOr<T, Output = T>> BitOrAssign<&'a T> for Vector<T>
Performs bitwise-or assignment between a vector and a scalar.
Source§fn bitor_assign(&mut self, _rhs: &T)
fn bitor_assign(&mut self, _rhs: &T)
|= operation. Read moreSource§impl<'a, T: Copy + BitOr<T, Output = T>> BitOrAssign<&'a Vector<T>> for Vector<T>
Performs elementwise
bitwise-or
assignment between two vectors.
impl<'a, T: Copy + BitOr<T, Output = T>> BitOrAssign<&'a Vector<T>> for Vector<T>
Performs elementwise bitwise-or assignment between two vectors.
Source§fn bitor_assign(&mut self, _rhs: &Vector<T>)
fn bitor_assign(&mut self, _rhs: &Vector<T>)
|= operation. Read moreSource§impl<T: Copy + BitOr<T, Output = T>> BitOrAssign<T> for Vector<T>
Performs
bitwise-or
assignment between a vector and a scalar.
impl<T: Copy + BitOr<T, Output = T>> BitOrAssign<T> for Vector<T>
Performs bitwise-or assignment between a vector and a scalar.
Source§fn bitor_assign(&mut self, _rhs: T)
fn bitor_assign(&mut self, _rhs: T)
|= operation. Read moreSource§impl<T: Copy + BitOr<T, Output = T>> BitOrAssign for Vector<T>
Performs elementwise
bitwise-or
assignment between two vectors.
impl<T: Copy + BitOr<T, Output = T>> BitOrAssign for Vector<T>
Performs elementwise bitwise-or assignment between two vectors.
Source§fn bitor_assign(&mut self, _rhs: Vector<T>)
fn bitor_assign(&mut self, _rhs: Vector<T>)
|= operation. Read moreSource§impl<'a, 'b, T: Copy + BitXor<T, Output = T>> BitXor<&'b T> for &'a Vector<T>
Scalar
bitwise-xor
with Vector allocating new memory.
impl<'a, 'b, T: Copy + BitXor<T, Output = T>> BitXor<&'b T> for &'a Vector<T>
Scalar bitwise-xor with Vector allocating new memory.
Source§impl<'a, T: Copy + BitXor<T, Output = T>> BitXor<&'a T> for Vector<T>
Scalar
bitwise-xor
with Vector reusing current memory.
impl<'a, T: Copy + BitXor<T, Output = T>> BitXor<&'a T> for Vector<T>
Scalar bitwise-xor with Vector reusing current memory.
Source§impl<'a, 'b, T: Copy + BitXor<T, Output = T>> BitXor<&'b Vector<T>> for &'a Vector<T>
Vector
bitwise-xor
with Vector allocating new memory.
impl<'a, 'b, T: Copy + BitXor<T, Output = T>> BitXor<&'b Vector<T>> for &'a Vector<T>
Vector bitwise-xor with Vector allocating new memory.
Source§impl<'a, T: Copy + BitXor<T, Output = T>> BitXor<&'a Vector<T>> for Vector<T>
Vector
bitwise-xor
with Vector reusing current memory.
impl<'a, T: Copy + BitXor<T, Output = T>> BitXor<&'a Vector<T>> for Vector<T>
Vector bitwise-xor with Vector reusing current memory.
Source§impl<'a, T: Copy + BitXor<T, Output = T>> BitXor<T> for &'a Vector<T>
Scalar
bitwise-xor
with Vector allocating new memory.
impl<'a, T: Copy + BitXor<T, Output = T>> BitXor<T> for &'a Vector<T>
Scalar bitwise-xor with Vector allocating new memory.
Source§impl<T: Copy + BitXor<T, Output = T>> BitXor<T> for Vector<T>
Scalar
bitwise-xor
with Vector reusing current memory.
impl<T: Copy + BitXor<T, Output = T>> BitXor<T> for Vector<T>
Scalar bitwise-xor with Vector reusing current memory.
Source§impl<'a, T: Copy + BitXor<T, Output = T>> BitXor<Vector<T>> for &'a Vector<T>
Vector
bitwise-xor
with Vector reusing current memory.
impl<'a, T: Copy + BitXor<T, Output = T>> BitXor<Vector<T>> for &'a Vector<T>
Vector bitwise-xor with Vector reusing current memory.
Source§impl<T: Copy + BitXor<T, Output = T>> BitXor for Vector<T>
Vector
bitwise-xor
with Vector reusing current memory.
impl<T: Copy + BitXor<T, Output = T>> BitXor for Vector<T>
Vector bitwise-xor with Vector reusing current memory.
Source§impl<'a, T: Copy + BitXor<T, Output = T>> BitXorAssign<&'a T> for Vector<T>
Performs
bitwise-xor
assignment between a vector and a scalar.
impl<'a, T: Copy + BitXor<T, Output = T>> BitXorAssign<&'a T> for Vector<T>
Performs bitwise-xor assignment between a vector and a scalar.
Source§fn bitxor_assign(&mut self, _rhs: &T)
fn bitxor_assign(&mut self, _rhs: &T)
^= operation. Read moreSource§impl<'a, T: Copy + BitXor<T, Output = T>> BitXorAssign<&'a Vector<T>> for Vector<T>
Performs elementwise
bitwise-xor
assignment between two vectors.
impl<'a, T: Copy + BitXor<T, Output = T>> BitXorAssign<&'a Vector<T>> for Vector<T>
Performs elementwise bitwise-xor assignment between two vectors.
Source§fn bitxor_assign(&mut self, _rhs: &Vector<T>)
fn bitxor_assign(&mut self, _rhs: &Vector<T>)
^= operation. Read moreSource§impl<T: Copy + BitXor<T, Output = T>> BitXorAssign<T> for Vector<T>
Performs
bitwise-xor
assignment between a vector and a scalar.
impl<T: Copy + BitXor<T, Output = T>> BitXorAssign<T> for Vector<T>
Performs bitwise-xor assignment between a vector and a scalar.
Source§fn bitxor_assign(&mut self, _rhs: T)
fn bitxor_assign(&mut self, _rhs: T)
^= operation. Read moreSource§impl<T: Copy + BitXor<T, Output = T>> BitXorAssign for Vector<T>
Performs elementwise
bitwise-xor
assignment between two vectors.
impl<T: Copy + BitXor<T, Output = T>> BitXorAssign for Vector<T>
Performs elementwise bitwise-xor assignment between two vectors.
Source§fn bitxor_assign(&mut self, _rhs: Vector<T>)
fn bitxor_assign(&mut self, _rhs: Vector<T>)
^= operation. Read moreSource§impl<'a, 'b, T: Copy + Div<T, Output = T>> Div<&'b T> for &'a Vector<T>
Scalar
division
with Vector allocating new memory.
impl<'a, 'b, T: Copy + Div<T, Output = T>> Div<&'b T> for &'a Vector<T>
Scalar division with Vector allocating new memory.
Source§impl<'a, T: Copy + Div<T, Output = T>> Div<&'a T> for Vector<T>
Scalar
division
with Vector reusing current memory.
impl<'a, T: Copy + Div<T, Output = T>> Div<&'a T> for Vector<T>
Scalar division with Vector reusing current memory.
Source§impl<'a, T: Copy + Div<T, Output = T>> Div<T> for &'a Vector<T>
Scalar
division
with Vector allocating new memory.
impl<'a, T: Copy + Div<T, Output = T>> Div<T> for &'a Vector<T>
Scalar division with Vector allocating new memory.
Source§impl<T: Copy + Div<T, Output = T>> Div<T> for Vector<T>
Scalar
division
with Vector reusing current memory.
impl<T: Copy + Div<T, Output = T>> Div<T> for Vector<T>
Scalar division with Vector reusing current memory.
Source§impl<'a, T: Copy + Div<T, Output = T>> DivAssign<&'a T> for Vector<T>
Performs
division
assignment between a vector and a scalar.
impl<'a, T: Copy + Div<T, Output = T>> DivAssign<&'a T> for Vector<T>
Performs division assignment between a vector and a scalar.
Source§fn div_assign(&mut self, _rhs: &T)
fn div_assign(&mut self, _rhs: &T)
/= operation. Read moreSource§impl<T: Copy + Div<T, Output = T>> DivAssign<T> for Vector<T>
Performs
division
assignment between a vector and a scalar.
impl<T: Copy + Div<T, Output = T>> DivAssign<T> for Vector<T>
Performs division assignment between a vector and a scalar.
Source§fn div_assign(&mut self, _rhs: T)
fn div_assign(&mut self, _rhs: T)
/= operation. Read moreSource§impl<T> FromIterator<T> for Vector<T>
impl<T> FromIterator<T> for Vector<T>
Source§fn from_iter<I>(iter: I) -> Selfwhere
I: IntoIterator<Item = T>,
fn from_iter<I>(iter: I) -> Selfwhere
I: IntoIterator<Item = T>,
Source§impl<'a, T> IntoIterator for &'a Vector<T>
impl<'a, T> IntoIterator for &'a Vector<T>
Source§impl<T> IntoIterator for Vector<T>
impl<T> IntoIterator for Vector<T>
Source§impl<'a, 'b, T: Copy + Mul<T, Output = T>> Mul<&'b T> for &'a Vector<T>
Scalar
multiplication
with Vector allocating new memory.
impl<'a, 'b, T: Copy + Mul<T, Output = T>> Mul<&'b T> for &'a Vector<T>
Scalar multiplication with Vector allocating new memory.
Source§impl<'a, T: Copy + Mul<T, Output = T>> Mul<&'a T> for Vector<T>
Scalar
multiplication
with Vector reusing current memory.
impl<'a, T: Copy + Mul<T, Output = T>> Mul<&'a T> for Vector<T>
Scalar multiplication with Vector reusing current memory.
Source§impl<'a, 'b, T> Mul<&'a Vector<T>> for &'b PermutationMatrix<T>
Left-multiply a vector by a permutation matrix.
impl<'a, 'b, T> Mul<&'a Vector<T>> for &'b PermutationMatrix<T>
Left-multiply a vector by a permutation matrix.
Source§impl<'a, T> Mul<&'a Vector<T>> for PermutationMatrix<T>
Left-multiply a vector by a permutation matrix.
impl<'a, T> Mul<&'a Vector<T>> for PermutationMatrix<T>
Left-multiply a vector by a permutation matrix.
Source§impl<'a, T: Copy + Mul<T, Output = T>> Mul<T> for &'a Vector<T>
Scalar
multiplication
with Vector allocating new memory.
impl<'a, T: Copy + Mul<T, Output = T>> Mul<T> for &'a Vector<T>
Scalar multiplication with Vector allocating new memory.
Source§impl<T: Copy + Mul<T, Output = T>> Mul<T> for Vector<T>
Scalar
multiplication
with Vector reusing current memory.
impl<T: Copy + Mul<T, Output = T>> Mul<T> for Vector<T>
Scalar multiplication with Vector reusing current memory.
Source§impl<'a, T> Mul<Vector<T>> for &'a PermutationMatrix<T>
Left-multiply a vector by a permutation matrix.
impl<'a, T> Mul<Vector<T>> for &'a PermutationMatrix<T>
Left-multiply a vector by a permutation matrix.
Source§impl<T> Mul<Vector<T>> for PermutationMatrix<T>
Left-multiply a vector by a permutation matrix.
impl<T> Mul<Vector<T>> for PermutationMatrix<T>
Left-multiply a vector by a permutation matrix.
Source§impl<'a, T: Copy + Mul<T, Output = T>> MulAssign<&'a T> for Vector<T>
Performs
multiplication
assignment between a vector and a scalar.
impl<'a, T: Copy + Mul<T, Output = T>> MulAssign<&'a T> for Vector<T>
Performs multiplication assignment between a vector and a scalar.
Source§fn mul_assign(&mut self, _rhs: &T)
fn mul_assign(&mut self, _rhs: &T)
*= operation. Read moreSource§impl<T: Copy + Mul<T, Output = T>> MulAssign<T> for Vector<T>
Performs
multiplication
assignment between a vector and a scalar.
impl<T: Copy + Mul<T, Output = T>> MulAssign<T> for Vector<T>
Performs multiplication assignment between a vector and a scalar.
Source§fn mul_assign(&mut self, _rhs: T)
fn mul_assign(&mut self, _rhs: T)
*= operation. Read moreSource§impl<'a, 'b, T: Copy + Rem<T, Output = T>> Rem<&'b T> for &'a Vector<T>
Scalar
remainder
with Vector allocating new memory.
impl<'a, 'b, T: Copy + Rem<T, Output = T>> Rem<&'b T> for &'a Vector<T>
Scalar remainder with Vector allocating new memory.
Source§impl<'a, T: Copy + Rem<T, Output = T>> Rem<&'a T> for Vector<T>
Scalar
remainder
with Vector reusing current memory.
impl<'a, T: Copy + Rem<T, Output = T>> Rem<&'a T> for Vector<T>
Scalar remainder with Vector reusing current memory.
Source§impl<'a, 'b, T: Copy + Rem<T, Output = T>> Rem<&'b Vector<T>> for &'a Vector<T>
Vector
remainder
with Vector allocating new memory.
impl<'a, 'b, T: Copy + Rem<T, Output = T>> Rem<&'b Vector<T>> for &'a Vector<T>
Vector remainder with Vector allocating new memory.
Source§impl<'a, T: Copy + Rem<T, Output = T>> Rem<&'a Vector<T>> for Vector<T>
Vector
remainder
with Vector reusing current memory.
impl<'a, T: Copy + Rem<T, Output = T>> Rem<&'a Vector<T>> for Vector<T>
Vector remainder with Vector reusing current memory.
Source§impl<'a, T: Copy + Rem<T, Output = T>> Rem<T> for &'a Vector<T>
Scalar
remainder
with Vector allocating new memory.
impl<'a, T: Copy + Rem<T, Output = T>> Rem<T> for &'a Vector<T>
Scalar remainder with Vector allocating new memory.
Source§impl<T: Copy + Rem<T, Output = T>> Rem<T> for Vector<T>
Scalar
remainder
with Vector reusing current memory.
impl<T: Copy + Rem<T, Output = T>> Rem<T> for Vector<T>
Scalar remainder with Vector reusing current memory.
Source§impl<'a, T: Copy + Rem<T, Output = T>> Rem<Vector<T>> for &'a Vector<T>
Vector
remainder
with Vector reusing current memory.
impl<'a, T: Copy + Rem<T, Output = T>> Rem<Vector<T>> for &'a Vector<T>
Vector remainder with Vector reusing current memory.
Source§impl<T: Copy + Rem<T, Output = T>> Rem for Vector<T>
Vector
remainder
with Vector reusing current memory.
impl<T: Copy + Rem<T, Output = T>> Rem for Vector<T>
Vector remainder with Vector reusing current memory.
Source§impl<'a, T: Copy + Rem<T, Output = T>> RemAssign<&'a T> for Vector<T>
Performs
reminder
assignment between a vector and a scalar.
impl<'a, T: Copy + Rem<T, Output = T>> RemAssign<&'a T> for Vector<T>
Performs reminder assignment between a vector and a scalar.
Source§fn rem_assign(&mut self, _rhs: &T)
fn rem_assign(&mut self, _rhs: &T)
%= operation. Read moreSource§impl<'a, T: Copy + Rem<T, Output = T>> RemAssign<&'a Vector<T>> for Vector<T>
Performs elementwise
remainder
assignment between two vectors.
impl<'a, T: Copy + Rem<T, Output = T>> RemAssign<&'a Vector<T>> for Vector<T>
Performs elementwise remainder assignment between two vectors.
Source§fn rem_assign(&mut self, _rhs: &Vector<T>)
fn rem_assign(&mut self, _rhs: &Vector<T>)
%= operation. Read moreSource§impl<T: Copy + Rem<T, Output = T>> RemAssign<T> for Vector<T>
Performs
reminder
assignment between a vector and a scalar.
impl<T: Copy + Rem<T, Output = T>> RemAssign<T> for Vector<T>
Performs reminder assignment between a vector and a scalar.
Source§fn rem_assign(&mut self, _rhs: T)
fn rem_assign(&mut self, _rhs: T)
%= operation. Read moreSource§impl<T: Copy + Rem<T, Output = T>> RemAssign for Vector<T>
Performs elementwise
remainder
assignment between two vectors.
impl<T: Copy + Rem<T, Output = T>> RemAssign for Vector<T>
Performs elementwise remainder assignment between two vectors.
Source§fn rem_assign(&mut self, _rhs: Vector<T>)
fn rem_assign(&mut self, _rhs: Vector<T>)
%= operation. Read moreSource§impl<'a, 'b, T: Copy + Sub<T, Output = T>> Sub<&'b T> for &'a Vector<T>
Scalar
subtraction
with Vector allocating new memory.
impl<'a, 'b, T: Copy + Sub<T, Output = T>> Sub<&'b T> for &'a Vector<T>
Scalar subtraction with Vector allocating new memory.
Source§impl<'a, T: Copy + Sub<T, Output = T>> Sub<&'a T> for Vector<T>
Scalar
subtraction
with Vector reusing current memory.
impl<'a, T: Copy + Sub<T, Output = T>> Sub<&'a T> for Vector<T>
Scalar subtraction with Vector reusing current memory.
Source§impl<'a, 'b, T: Copy + Sub<T, Output = T>> Sub<&'b Vector<T>> for &'a Vector<T>
Vector
subtraction
with Vector allocating new memory.
impl<'a, 'b, T: Copy + Sub<T, Output = T>> Sub<&'b Vector<T>> for &'a Vector<T>
Vector subtraction with Vector allocating new memory.
Source§impl<'a, T: Copy + Sub<T, Output = T>> Sub<&'a Vector<T>> for Vector<T>
Vector
subtraction
with Vector reusing current memory.
impl<'a, T: Copy + Sub<T, Output = T>> Sub<&'a Vector<T>> for Vector<T>
Vector subtraction with Vector reusing current memory.
Source§impl<'a, T: Copy + Sub<T, Output = T>> Sub<T> for &'a Vector<T>
Scalar
subtraction
with Vector allocating new memory.
impl<'a, T: Copy + Sub<T, Output = T>> Sub<T> for &'a Vector<T>
Scalar subtraction with Vector allocating new memory.
Source§impl<T: Copy + Sub<T, Output = T>> Sub<T> for Vector<T>
Scalar
subtraction
with Vector reusing current memory.
impl<T: Copy + Sub<T, Output = T>> Sub<T> for Vector<T>
Scalar subtraction with Vector reusing current memory.
Source§impl<'a, T: Copy + Sub<T, Output = T>> Sub<Vector<T>> for &'a Vector<T>
Vector
subtraction
with Vector reusing current memory.
impl<'a, T: Copy + Sub<T, Output = T>> Sub<Vector<T>> for &'a Vector<T>
Vector subtraction with Vector reusing current memory.
Source§impl<T: Copy + Sub<T, Output = T>> Sub for Vector<T>
Vector
subtraction
with Vector reusing current memory.
impl<T: Copy + Sub<T, Output = T>> Sub for Vector<T>
Vector subtraction with Vector reusing current memory.
Source§impl<'a, T: Copy + Sub<T, Output = T>> SubAssign<&'a T> for Vector<T>
Performs
subtraction
assignment between a vector and a scalar.
impl<'a, T: Copy + Sub<T, Output = T>> SubAssign<&'a T> for Vector<T>
Performs subtraction assignment between a vector and a scalar.
Source§fn sub_assign(&mut self, _rhs: &T)
fn sub_assign(&mut self, _rhs: &T)
-= operation. Read moreSource§impl<'a, T: Copy + Sub<T, Output = T>> SubAssign<&'a Vector<T>> for Vector<T>
Performs elementwise
subtraction
assignment between two vectors.
impl<'a, T: Copy + Sub<T, Output = T>> SubAssign<&'a Vector<T>> for Vector<T>
Performs elementwise subtraction assignment between two vectors.
Source§fn sub_assign(&mut self, _rhs: &Vector<T>)
fn sub_assign(&mut self, _rhs: &Vector<T>)
-= operation. Read moreSource§impl<T: Copy + Sub<T, Output = T>> SubAssign<T> for Vector<T>
Performs
subtraction
assignment between a vector and a scalar.
impl<T: Copy + Sub<T, Output = T>> SubAssign<T> for Vector<T>
Performs subtraction assignment between a vector and a scalar.
Source§fn sub_assign(&mut self, _rhs: T)
fn sub_assign(&mut self, _rhs: T)
-= operation. Read moreSource§impl<T: Copy + Sub<T, Output = T>> SubAssign for Vector<T>
Performs elementwise
subtraction
assignment between two vectors.
impl<T: Copy + Sub<T, Output = T>> SubAssign for Vector<T>
Performs elementwise subtraction assignment between two vectors.
Source§fn sub_assign(&mut self, _rhs: Vector<T>)
fn sub_assign(&mut self, _rhs: Vector<T>)
-= operation. Read more