[−][src]Struct rulinalg::vector::Vector
The Vector struct.
Can be instantiated with any type.
Methods
impl<T> Vector<T>[src]
pub fn new<U: Into<Vec<T>>>(data: U) -> Vector<T>[src]
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]);
pub fn from_fn<F>(size: usize, f: F) -> Vector<T> where
F: FnMut(usize) -> T, [src]
F: FnMut(usize) -> 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]);
pub fn size(&self) -> usize[src]
Returns the size of the Vector.
pub fn data(&self) -> &Vec<T>[src]
Returns a non-mutable reference to the underlying data.
pub fn mut_data(&mut self) -> &mut [T][src]
Returns a mutable slice of the underlying data.
pub fn into_vec(self) -> Vec<T>[src]
Consumes the Vector and returns the Vec of data.
pub fn iter(&self) -> Iter<T>[src]
Returns an iterator over the Vector's data.
pub fn iter_mut(&mut self) -> IterMut<T>[src]
Returns an iterator over mutable references to the Vector's data.
pub unsafe fn get_unchecked(&self, index: usize) -> &T[src]
Returns a pointer to the element at the given index, without doing bounds checking.
pub unsafe fn get_unchecked_mut(&mut self, index: usize) -> &mut T[src]
Returns an unsafe mutable pointer to the element at the given index, without doing bounds checking.
impl<T: Copy> Vector<T>[src]
pub fn apply(self, f: &dyn Fn(T) -> T) -> Vector<T>[src]
Applies a function to each element in the vector.
Examples
use rulinalg::vector::Vector; fn add_two(a: f64) -> f64 { a + 2f64 } let a = vector![0.; 4]; let b = a.apply(&add_two); assert_eq!(b, vector![2.0; 4]);
impl<T: Copy + PartialOrd> Vector<T>[src]
pub fn argmax(&self) -> (usize, T)[src]
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);
pub fn argmin(&self) -> (usize, T)[src]
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);
pub fn select(&self, idxs: &[usize]) -> Vector<T>[src]
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]);
impl<T: Clone + Zero> Vector<T>[src]
pub fn zeros(size: usize) -> Vector<T>[src]
Constructs Vector of all zeros.
Requires the size of the vector.
Examples
use rulinalg::vector::Vector; let vec = Vector::<f64>::zeros(10);
impl<T: Clone + One> Vector<T>[src]
pub fn ones(size: usize) -> Vector<T>[src]
Constructs Vector of all ones.
Requires the size of the vector.
Examples
use rulinalg::vector::Vector; let vec = Vector::<f64>::ones(10);
impl<T: Copy + Zero + Mul<T, Output = T> + Add<T, Output = T>> Vector<T>[src]
pub fn dot(&self, v: &Vector<T>) -> T[src]
Compute dot product with specified Vector.
Examples
use rulinalg::vector::Vector; let a = vector![1.0, 2.0, 3.0, 4.0]; let b = vector![2.0; 4]; let c = a.dot(&b); assert_eq!(c, 20.0);
impl<T: Copy + Zero + Add<T, Output = T>> Vector<T>[src]
pub fn sum(&self) -> T[src]
The sum of the vector.
Returns the sum of all elements in the vector.
Examples
use rulinalg::vector::Vector; let a = vector![1.0, 2.0, 3.0, 4.0]; let c = a.sum(); assert_eq!(c, 10.0);
impl<T: Copy + Mul<T, Output = T>> Vector<T>[src]
pub fn elemul(&self, v: &Vector<T>) -> Vector<T>[src]
The elementwise product of two vectors.
Examples
use rulinalg::vector::Vector; let a = vector![1.0, 2.0, 3.0, 4.0]; let b = vector![1.0, 2.0, 3.0, 4.0]; let c = &a.elemul(&b); assert_eq!(c, &vector![1.0, 4.0, 9.0, 16.0]);
impl<T: Copy + Div<T, Output = T>> Vector<T>[src]
pub fn elediv(&self, v: &Vector<T>) -> Vector<T>[src]
The elementwise division of two vectors.
Examples
use rulinalg::vector::Vector; let a = vector![1.0, 2.0, 3.0, 4.0]; let b = vector![1.0, 2.0, 3.0, 4.0]; let c = &a.elediv(&b); assert_eq!(c, &vector![1.0; 4]);
impl<T: Float> Vector<T>[src]
pub fn norm<N: VectorNorm<T>>(&self, norm: N) -> T[src]
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);
pub fn metric<M: VectorMetric<T>>(&self, v: &Vector<T>, m: M) -> T[src]
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);
impl<T: Float + FromPrimitive> Vector<T>[src]
pub fn mean(&self) -> T[src]
The mean of the vector.
Returns the arithmetic mean of the vector.
Examples
use rulinalg::vector::Vector; let a = vector![1.0, 2.0, 3.0, 4.0]; let c = a.mean(); assert_eq!(c, 2.5);
pub fn variance(&self) -> T[src]
The variance of the vector.
Returns the unbiased sample variance of the vector.
Examples
use rulinalg::vector::Vector; let a = vector![1.0, 2.0, 3.0, 4.0]; let c = a.variance(); assert_eq!(c, 5.0 / 3.0);
Trait Implementations
impl<T: Eq> Eq for Vector<T>[src]
impl<T> Into<Vec<T>> for Vector<T>[src]
impl<T: Clone> Clone for Vector<T>[src]
fn clone(&self) -> Vector<T>[src]
Clones the Vector.
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<T> IntoIterator for Vector<T>[src]
type Item = T
The type of the elements being iterated over.
type IntoIter = IntoIter<T>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter[src]
impl<'a, T> IntoIterator for &'a Vector<T>[src]
type Item = &'a T
The type of the elements being iterated over.
type IntoIter = Iter<'a, T>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter[src]
impl<T: PartialEq> PartialEq<Vector<T>> for Vector<T>[src]
impl<T> From<Vec<T>> for Vector<T>[src]
impl<'a, T> From<&'a [T]> for Vector<T> where
T: Clone, [src]
T: Clone,
impl<T> From<Vector<T>> for Matrix<T>[src]
impl<'a, T: Clone> From<Row<'a, T>> for Vector<T>[src]
impl<'a, T: Clone> From<RowMut<'a, T>> for Vector<T>[src]
impl<'a, T: Clone> From<Column<'a, T>> for Vector<T>[src]
impl<'a, T: Clone> From<ColumnMut<'a, T>> for Vector<T>[src]
impl<T: Hash> Hash for Vector<T>[src]
fn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl<T: Copy + Add<T, Output = T>> Add<T> for Vector<T>[src]
Scalar addition with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the + operator.
fn add(self, f: T) -> Vector<T>[src]
impl<'a, T: Copy + Add<T, Output = T>> Add<&'a T> for Vector<T>[src]
Scalar addition with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the + operator.
fn add(self, f: &T) -> Vector<T>[src]
impl<'a, T: Copy + Add<T, Output = T>> Add<T> for &'a Vector<T>[src]
Scalar addition with Vector allocating new memory.
type Output = Vector<T>
The resulting type after applying the + operator.
fn add(self, f: T) -> Vector<T>[src]
impl<'a, 'b, T: Copy + Add<T, Output = T>> Add<&'b T> for &'a Vector<T>[src]
Scalar addition with Vector allocating new memory.
type Output = Vector<T>
The resulting type after applying the + operator.
fn add(self, f: &T) -> Vector<T>[src]
impl<T: Copy + Add<T, Output = T>> Add<Vector<T>> for Vector<T>[src]
Vector addition with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the + operator.
fn add(self, v: Vector<T>) -> Vector<T>[src]
impl<'a, T: Copy + Add<T, Output = T>> Add<&'a Vector<T>> for Vector<T>[src]
Vector addition with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the + operator.
fn add(self, v: &Vector<T>) -> Vector<T>[src]
impl<'a, T: Copy + Add<T, Output = T>> Add<Vector<T>> for &'a Vector<T>[src]
Vector addition with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the + operator.
fn add(self, v: Vector<T>) -> Vector<T>[src]
impl<'a, 'b, T: Copy + Add<T, Output = T>> Add<&'b Vector<T>> for &'a Vector<T>[src]
Vector addition with Vector allocating new memory.
type Output = Vector<T>
The resulting type after applying the + operator.
fn add(self, v: &Vector<T>) -> Vector<T>[src]
impl<T: Copy + Sub<T, Output = T>> Sub<T> for Vector<T>[src]
Scalar subtraction with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the - operator.
fn sub(self, f: T) -> Vector<T>[src]
impl<'a, T: Copy + Sub<T, Output = T>> Sub<&'a T> for Vector<T>[src]
Scalar subtraction with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the - operator.
fn sub(self, f: &T) -> Vector<T>[src]
impl<'a, T: Copy + Sub<T, Output = T>> Sub<T> for &'a Vector<T>[src]
Scalar subtraction with Vector allocating new memory.
type Output = Vector<T>
The resulting type after applying the - operator.
fn sub(self, f: T) -> Vector<T>[src]
impl<'a, 'b, T: Copy + Sub<T, Output = T>> Sub<&'b T> for &'a Vector<T>[src]
Scalar subtraction with Vector allocating new memory.
type Output = Vector<T>
The resulting type after applying the - operator.
fn sub(self, f: &T) -> Vector<T>[src]
impl<T: Copy + Sub<T, Output = T>> Sub<Vector<T>> for Vector<T>[src]
Vector subtraction with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the - operator.
fn sub(self, v: Vector<T>) -> Vector<T>[src]
impl<'a, T: Copy + Sub<T, Output = T>> Sub<&'a Vector<T>> for Vector<T>[src]
Vector subtraction with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the - operator.
fn sub(self, v: &Vector<T>) -> Vector<T>[src]
impl<'a, T: Copy + Sub<T, Output = T>> Sub<Vector<T>> for &'a Vector<T>[src]
Vector subtraction with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the - operator.
fn sub(self, v: Vector<T>) -> Vector<T>[src]
impl<'a, 'b, T: Copy + Sub<T, Output = T>> Sub<&'b Vector<T>> for &'a Vector<T>[src]
Vector subtraction with Vector allocating new memory.
type Output = Vector<T>
The resulting type after applying the - operator.
fn sub(self, v: &Vector<T>) -> Vector<T>[src]
impl<T> Mul<Vector<T>> for Matrix<T> where
T: Copy + Zero + Mul<T, Output = T> + Add<T, Output = T>, [src]
T: Copy + Zero + Mul<T, Output = T> + Add<T, Output = T>,
Multiplies matrix by vector.
type Output = Vector<T>
The resulting type after applying the * operator.
fn mul(self, m: Vector<T>) -> Vector<T>[src]
impl<'a, T> Mul<Vector<T>> for &'a Matrix<T> where
T: Copy + Zero + Mul<T, Output = T> + Add<T, Output = T>, [src]
T: Copy + Zero + Mul<T, Output = T> + Add<T, Output = T>,
Multiplies matrix by vector.
type Output = Vector<T>
The resulting type after applying the * operator.
fn mul(self, m: Vector<T>) -> Vector<T>[src]
impl<'a, T> Mul<&'a Vector<T>> for Matrix<T> where
T: Copy + Zero + Mul<T, Output = T> + Add<T, Output = T>, [src]
T: Copy + Zero + Mul<T, Output = T> + Add<T, Output = T>,
Multiplies matrix by vector.
type Output = Vector<T>
The resulting type after applying the * operator.
fn mul(self, m: &Vector<T>) -> Vector<T>[src]
impl<'a, 'b, T> Mul<&'b Vector<T>> for &'a Matrix<T> where
T: Copy + Zero + Mul<T, Output = T> + Add<T, Output = T>, [src]
T: Copy + Zero + Mul<T, Output = T> + Add<T, Output = T>,
Multiplies matrix by vector.
type Output = Vector<T>
The resulting type after applying the * operator.
fn mul(self, v: &Vector<T>) -> Vector<T>[src]
impl<T> Mul<Vector<T>> for PermutationMatrix<T>[src]
Left-multiply a vector by a permutation matrix.
type Output = Vector<T>
The resulting type after applying the * operator.
fn mul(self, rhs: Vector<T>) -> Vector<T>[src]
impl<'a, T> Mul<Vector<T>> for &'a PermutationMatrix<T> where
T: Clone + Zero, [src]
T: Clone + Zero,
Left-multiply a vector by a permutation matrix.
type Output = Vector<T>
The resulting type after applying the * operator.
fn mul(self, rhs: Vector<T>) -> Vector<T>[src]
impl<'a, 'b, T> Mul<&'a Vector<T>> for &'b PermutationMatrix<T> where
T: Clone + Zero, [src]
T: Clone + Zero,
Left-multiply a vector by a permutation matrix.
type Output = Vector<T>
The resulting type after applying the * operator.
fn mul(self, rhs: &'a Vector<T>) -> Vector<T>[src]
impl<'a, T> Mul<&'a Vector<T>> for PermutationMatrix<T> where
T: Clone + Zero, [src]
T: Clone + Zero,
Left-multiply a vector by a permutation matrix.
type Output = Vector<T>
The resulting type after applying the * operator.
fn mul(self, rhs: &'a Vector<T>) -> Vector<T>[src]
impl<T: Copy + Mul<T, Output = T>> Mul<T> for Vector<T>[src]
Scalar multiplication with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the * operator.
fn mul(self, f: T) -> Vector<T>[src]
impl<'a, T: Copy + Mul<T, Output = T>> Mul<&'a T> for Vector<T>[src]
Scalar multiplication with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the * operator.
fn mul(self, f: &T) -> Vector<T>[src]
impl<'a, T: Copy + Mul<T, Output = T>> Mul<T> for &'a Vector<T>[src]
Scalar multiplication with Vector allocating new memory.
type Output = Vector<T>
The resulting type after applying the * operator.
fn mul(self, f: T) -> Vector<T>[src]
impl<'a, 'b, T: Copy + Mul<T, Output = T>> Mul<&'b T> for &'a Vector<T>[src]
Scalar multiplication with Vector allocating new memory.
type Output = Vector<T>
The resulting type after applying the * operator.
fn mul(self, f: &T) -> Vector<T>[src]
impl<T: Copy + Div<T, Output = T>> Div<T> for Vector<T>[src]
Scalar division with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the / operator.
fn div(self, f: T) -> Vector<T>[src]
impl<'a, T: Copy + Div<T, Output = T>> Div<&'a T> for Vector<T>[src]
Scalar division with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the / operator.
fn div(self, f: &T) -> Vector<T>[src]
impl<'a, T: Copy + Div<T, Output = T>> Div<T> for &'a Vector<T>[src]
Scalar division with Vector allocating new memory.
type Output = Vector<T>
The resulting type after applying the / operator.
fn div(self, f: T) -> Vector<T>[src]
impl<'a, 'b, T: Copy + Div<T, Output = T>> Div<&'b T> for &'a Vector<T>[src]
Scalar division with Vector allocating new memory.
type Output = Vector<T>
The resulting type after applying the / operator.
fn div(self, f: &T) -> Vector<T>[src]
impl<T: Copy + Rem<T, Output = T>> Rem<T> for Vector<T>[src]
Scalar remainder with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the % operator.
fn rem(self, f: T) -> Vector<T>[src]
impl<'a, T: Copy + Rem<T, Output = T>> Rem<&'a T> for Vector<T>[src]
Scalar remainder with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the % operator.
fn rem(self, f: &T) -> Vector<T>[src]
impl<'a, T: Copy + Rem<T, Output = T>> Rem<T> for &'a Vector<T>[src]
Scalar remainder with Vector allocating new memory.
type Output = Vector<T>
The resulting type after applying the % operator.
fn rem(self, f: T) -> Vector<T>[src]
impl<'a, 'b, T: Copy + Rem<T, Output = T>> Rem<&'b T> for &'a Vector<T>[src]
Scalar remainder with Vector allocating new memory.
type Output = Vector<T>
The resulting type after applying the % operator.
fn rem(self, f: &T) -> Vector<T>[src]
impl<T: Copy + Rem<T, Output = T>> Rem<Vector<T>> for Vector<T>[src]
Vector remainder with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the % operator.
fn rem(self, v: Vector<T>) -> Vector<T>[src]
impl<'a, T: Copy + Rem<T, Output = T>> Rem<&'a Vector<T>> for Vector<T>[src]
Vector remainder with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the % operator.
fn rem(self, v: &Vector<T>) -> Vector<T>[src]
impl<'a, T: Copy + Rem<T, Output = T>> Rem<Vector<T>> for &'a Vector<T>[src]
Vector remainder with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the % operator.
fn rem(self, v: Vector<T>) -> Vector<T>[src]
impl<'a, 'b, T: Copy + Rem<T, Output = T>> Rem<&'b Vector<T>> for &'a Vector<T>[src]
Vector remainder with Vector allocating new memory.
type Output = Vector<T>
The resulting type after applying the % operator.
fn rem(self, v: &Vector<T>) -> Vector<T>[src]
impl<T: Neg<Output = T> + Copy> Neg for Vector<T>[src]
Gets negative of vector.
type Output = Vector<T>
The resulting type after applying the - operator.
fn neg(self) -> Vector<T>[src]
impl<'a, T: Neg<Output = T> + Copy> Neg for &'a Vector<T>[src]
Gets negative of vector.
type Output = Vector<T>
The resulting type after applying the - operator.
fn neg(self) -> Vector<T>[src]
impl<T: Copy + Add<T, Output = T>> AddAssign<T> for Vector<T>[src]
Performs addition assignment between a vector and a scalar.
fn add_assign(&mut self, _rhs: T)[src]
impl<'a, T: Copy + Add<T, Output = T>> AddAssign<&'a T> for Vector<T>[src]
Performs addition assignment between a vector and a scalar.
fn add_assign(&mut self, _rhs: &T)[src]
impl<T: Copy + Add<T, Output = T>> AddAssign<Vector<T>> for Vector<T>[src]
Performs elementwise addition assignment between two vectors.
fn add_assign(&mut self, _rhs: Vector<T>)[src]
impl<'a, T: Copy + Add<T, Output = T>> AddAssign<&'a Vector<T>> for Vector<T>[src]
Performs elementwise addition assignment between two vectors.
fn add_assign(&mut self, _rhs: &Vector<T>)[src]
impl<T: Copy + Sub<T, Output = T>> SubAssign<T> for Vector<T>[src]
Performs subtraction assignment between a vector and a scalar.
fn sub_assign(&mut self, _rhs: T)[src]
impl<'a, T: Copy + Sub<T, Output = T>> SubAssign<&'a T> for Vector<T>[src]
Performs subtraction assignment between a vector and a scalar.
fn sub_assign(&mut self, _rhs: &T)[src]
impl<T: Copy + Sub<T, Output = T>> SubAssign<Vector<T>> for Vector<T>[src]
Performs elementwise subtraction assignment between two vectors.
fn sub_assign(&mut self, _rhs: Vector<T>)[src]
impl<'a, T: Copy + Sub<T, Output = T>> SubAssign<&'a Vector<T>> for Vector<T>[src]
Performs elementwise subtraction assignment between two vectors.
fn sub_assign(&mut self, _rhs: &Vector<T>)[src]
impl<T: Copy + Mul<T, Output = T>> MulAssign<T> for Vector<T>[src]
Performs multiplication assignment between a vector and a scalar.
fn mul_assign(&mut self, _rhs: T)[src]
impl<'a, T: Copy + Mul<T, Output = T>> MulAssign<&'a T> for Vector<T>[src]
Performs multiplication assignment between a vector and a scalar.
fn mul_assign(&mut self, _rhs: &T)[src]
impl<T: Copy + Div<T, Output = T>> DivAssign<T> for Vector<T>[src]
Performs division assignment between a vector and a scalar.
fn div_assign(&mut self, _rhs: T)[src]
impl<'a, T: Copy + Div<T, Output = T>> DivAssign<&'a T> for Vector<T>[src]
Performs division assignment between a vector and a scalar.
fn div_assign(&mut self, _rhs: &T)[src]
impl<T: Copy + Rem<T, Output = T>> RemAssign<T> for Vector<T>[src]
Performs reminder assignment between a vector and a scalar.
fn rem_assign(&mut self, _rhs: T)[src]
impl<'a, T: Copy + Rem<T, Output = T>> RemAssign<&'a T> for Vector<T>[src]
Performs reminder assignment between a vector and a scalar.
fn rem_assign(&mut self, _rhs: &T)[src]
impl<T: Copy + Rem<T, Output = T>> RemAssign<Vector<T>> for Vector<T>[src]
Performs elementwise remainder assignment between two vectors.
fn rem_assign(&mut self, _rhs: Vector<T>)[src]
impl<'a, T: Copy + Rem<T, Output = T>> RemAssign<&'a Vector<T>> for Vector<T>[src]
Performs elementwise remainder assignment between two vectors.
fn rem_assign(&mut self, _rhs: &Vector<T>)[src]
impl<T: Not<Output = T> + Copy> Not for Vector<T>[src]
Gets not of vector.
type Output = Vector<T>
The resulting type after applying the ! operator.
fn not(self) -> Vector<T>[src]
impl<'a, T: Not<Output = T> + Copy> Not for &'a Vector<T>[src]
Gets not of vector.
type Output = Vector<T>
The resulting type after applying the ! operator.
fn not(self) -> Vector<T>[src]
impl<T: Copy + BitAnd<T, Output = T>> BitAnd<T> for Vector<T>[src]
Scalar bitwise-and with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the & operator.
fn bitand(self, f: T) -> Vector<T>[src]
impl<'a, T: Copy + BitAnd<T, Output = T>> BitAnd<&'a T> for Vector<T>[src]
Scalar bitwise-and with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the & operator.
fn bitand(self, f: &T) -> Vector<T>[src]
impl<'a, T: Copy + BitAnd<T, Output = T>> BitAnd<T> for &'a Vector<T>[src]
Scalar bitwise-and with Vector allocating new memory.
type Output = Vector<T>
The resulting type after applying the & operator.
fn bitand(self, f: T) -> Vector<T>[src]
impl<'a, 'b, T: Copy + BitAnd<T, Output = T>> BitAnd<&'b T> for &'a Vector<T>[src]
Scalar bitwise-and with Vector allocating new memory.
type Output = Vector<T>
The resulting type after applying the & operator.
fn bitand(self, f: &T) -> Vector<T>[src]
impl<T: Copy + BitAnd<T, Output = T>> BitAnd<Vector<T>> for Vector<T>[src]
Vector bitwise-and with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the & operator.
fn bitand(self, v: Vector<T>) -> Vector<T>[src]
impl<'a, T: Copy + BitAnd<T, Output = T>> BitAnd<&'a Vector<T>> for Vector<T>[src]
Vector bitwise-and with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the & operator.
fn bitand(self, v: &Vector<T>) -> Vector<T>[src]
impl<'a, T: Copy + BitAnd<T, Output = T>> BitAnd<Vector<T>> for &'a Vector<T>[src]
Vector bitwise-and with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the & operator.
fn bitand(self, v: Vector<T>) -> Vector<T>[src]
impl<'a, 'b, T: Copy + BitAnd<T, Output = T>> BitAnd<&'b Vector<T>> for &'a Vector<T>[src]
Vector bitwise-and with Vector allocating new memory.
type Output = Vector<T>
The resulting type after applying the & operator.
fn bitand(self, v: &Vector<T>) -> Vector<T>[src]
impl<T: Copy + BitOr<T, Output = T>> BitOr<T> for Vector<T>[src]
Scalar bitwise-or with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the | operator.
fn bitor(self, f: T) -> Vector<T>[src]
impl<'a, T: Copy + BitOr<T, Output = T>> BitOr<&'a T> for Vector<T>[src]
Scalar bitwise-or with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the | operator.
fn bitor(self, f: &T) -> Vector<T>[src]
impl<'a, T: Copy + BitOr<T, Output = T>> BitOr<T> for &'a Vector<T>[src]
Scalar bitwise-or with Vector allocating new memory.
type Output = Vector<T>
The resulting type after applying the | operator.
fn bitor(self, f: T) -> Vector<T>[src]
impl<'a, 'b, T: Copy + BitOr<T, Output = T>> BitOr<&'b T> for &'a Vector<T>[src]
Scalar bitwise-or with Vector allocating new memory.
type Output = Vector<T>
The resulting type after applying the | operator.
fn bitor(self, f: &T) -> Vector<T>[src]
impl<T: Copy + BitOr<T, Output = T>> BitOr<Vector<T>> for Vector<T>[src]
Vector bitwise-or with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the | operator.
fn bitor(self, v: Vector<T>) -> Vector<T>[src]
impl<'a, T: Copy + BitOr<T, Output = T>> BitOr<&'a Vector<T>> for Vector<T>[src]
Vector bitwise-or with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the | operator.
fn bitor(self, v: &Vector<T>) -> Vector<T>[src]
impl<'a, T: Copy + BitOr<T, Output = T>> BitOr<Vector<T>> for &'a Vector<T>[src]
Vector bitwise-or with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the | operator.
fn bitor(self, v: Vector<T>) -> Vector<T>[src]
impl<'a, 'b, T: Copy + BitOr<T, Output = T>> BitOr<&'b Vector<T>> for &'a Vector<T>[src]
Vector bitwise-or with Vector allocating new memory.
type Output = Vector<T>
The resulting type after applying the | operator.
fn bitor(self, v: &Vector<T>) -> Vector<T>[src]
impl<T: Copy + BitXor<T, Output = T>> BitXor<T> for Vector<T>[src]
Scalar bitwise-xor with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the ^ operator.
fn bitxor(self, f: T) -> Vector<T>[src]
impl<'a, T: Copy + BitXor<T, Output = T>> BitXor<&'a T> for Vector<T>[src]
Scalar bitwise-xor with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the ^ operator.
fn bitxor(self, f: &T) -> Vector<T>[src]
impl<'a, T: Copy + BitXor<T, Output = T>> BitXor<T> for &'a Vector<T>[src]
Scalar bitwise-xor with Vector allocating new memory.
type Output = Vector<T>
The resulting type after applying the ^ operator.
fn bitxor(self, f: T) -> Vector<T>[src]
impl<'a, 'b, T: Copy + BitXor<T, Output = T>> BitXor<&'b T> for &'a Vector<T>[src]
Scalar bitwise-xor with Vector allocating new memory.
type Output = Vector<T>
The resulting type after applying the ^ operator.
fn bitxor(self, f: &T) -> Vector<T>[src]
impl<T: Copy + BitXor<T, Output = T>> BitXor<Vector<T>> for Vector<T>[src]
Vector bitwise-xor with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the ^ operator.
fn bitxor(self, v: Vector<T>) -> Vector<T>[src]
impl<'a, T: Copy + BitXor<T, Output = T>> BitXor<&'a Vector<T>> for Vector<T>[src]
Vector bitwise-xor with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the ^ operator.
fn bitxor(self, v: &Vector<T>) -> Vector<T>[src]
impl<'a, T: Copy + BitXor<T, Output = T>> BitXor<Vector<T>> for &'a Vector<T>[src]
Vector bitwise-xor with Vector reusing current memory.
type Output = Vector<T>
The resulting type after applying the ^ operator.
fn bitxor(self, v: Vector<T>) -> Vector<T>[src]
impl<'a, 'b, T: Copy + BitXor<T, Output = T>> BitXor<&'b Vector<T>> for &'a Vector<T>[src]
Vector bitwise-xor with Vector allocating new memory.
type Output = Vector<T>
The resulting type after applying the ^ operator.
fn bitxor(self, v: &Vector<T>) -> Vector<T>[src]
impl<T: Copy + BitAnd<T, Output = T>> BitAndAssign<T> for Vector<T>[src]
Performs bitwise-and assignment between a vector and a scalar.
fn bitand_assign(&mut self, _rhs: T)[src]
impl<'a, T: Copy + BitAnd<T, Output = T>> BitAndAssign<&'a T> for Vector<T>[src]
Performs bitwise-and assignment between a vector and a scalar.
fn bitand_assign(&mut self, _rhs: &T)[src]
impl<T: Copy + BitAnd<T, Output = T>> BitAndAssign<Vector<T>> for Vector<T>[src]
Performs elementwise bitwise-and assignment between two vectors.
fn bitand_assign(&mut self, _rhs: Vector<T>)[src]
impl<'a, T: Copy + BitAnd<T, Output = T>> BitAndAssign<&'a Vector<T>> for Vector<T>[src]
Performs elementwise bitwise-and assignment between two vectors.
fn bitand_assign(&mut self, _rhs: &Vector<T>)[src]
impl<T: Copy + BitOr<T, Output = T>> BitOrAssign<T> for Vector<T>[src]
Performs bitwise-or assignment between a vector and a scalar.
fn bitor_assign(&mut self, _rhs: T)[src]
impl<'a, T: Copy + BitOr<T, Output = T>> BitOrAssign<&'a T> for Vector<T>[src]
Performs bitwise-or assignment between a vector and a scalar.
fn bitor_assign(&mut self, _rhs: &T)[src]
impl<T: Copy + BitOr<T, Output = T>> BitOrAssign<Vector<T>> for Vector<T>[src]
Performs elementwise bitwise-or assignment between two vectors.
fn bitor_assign(&mut self, _rhs: Vector<T>)[src]
impl<'a, T: Copy + BitOr<T, Output = T>> BitOrAssign<&'a Vector<T>> for Vector<T>[src]
Performs elementwise bitwise-or assignment between two vectors.
fn bitor_assign(&mut self, _rhs: &Vector<T>)[src]
impl<T: Copy + BitXor<T, Output = T>> BitXorAssign<T> for Vector<T>[src]
Performs bitwise-xor assignment between a vector and a scalar.
fn bitxor_assign(&mut self, _rhs: T)[src]
impl<'a, T: Copy + BitXor<T, Output = T>> BitXorAssign<&'a T> for Vector<T>[src]
Performs bitwise-xor assignment between a vector and a scalar.
fn bitxor_assign(&mut self, _rhs: &T)[src]
impl<T: Copy + BitXor<T, Output = T>> BitXorAssign<Vector<T>> for Vector<T>[src]
Performs elementwise bitwise-xor assignment between two vectors.
fn bitxor_assign(&mut self, _rhs: Vector<T>)[src]
impl<'a, T: Copy + BitXor<T, Output = T>> BitXorAssign<&'a Vector<T>> for Vector<T>[src]
Performs elementwise bitwise-xor assignment between two vectors.
fn bitxor_assign(&mut self, _rhs: &Vector<T>)[src]
impl<T> Index<usize> for Vector<T>[src]
Indexes vector.
impl<T> IndexMut<usize> for Vector<T>[src]
Indexes mutable vector.
impl<T: Display> Display for Vector<T>[src]
impl<T: Debug> Debug for Vector<T>[src]
impl<T> FromIterator<T> for Vector<T>[src]
fn from_iter<I>(iter: I) -> Self where
I: IntoIterator<Item = T>, [src]
I: IntoIterator<Item = T>,
Auto Trait Implementations
impl<T> Sync for Vector<T> where
T: Sync,
T: Sync,
impl<T> Send for Vector<T> where
T: Send,
T: Send,
impl<T> Unpin for Vector<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Vector<T> where
T: UnwindSafe,
T: UnwindSafe,
impl<T> RefUnwindSafe for Vector<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<I> IntoIterator for I where
I: Iterator, [src]
I: Iterator,
type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
fn into_iter(self) -> I[src]
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T> From<T> for T[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T, Rhs> NumAssignOps<Rhs> for T where
T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>, [src]
T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,
impl<T, Base> RefNum<Base> for T where
T: NumOps<Base, Base> + NumOps<&'r Base, Base>, [src]
T: NumOps<Base, Base> + NumOps<&'r Base, Base>,
impl<T, Rhs, Output> NumOps<Rhs, Output> for T where
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>, [src]
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,