pub struct Vector { /* private fields */ }
Implementations§
source§impl Vector
impl Vector
sourcepub fn create(n: usize, value: Fraction) -> Vector
pub fn create(n: usize, value: Fraction) -> Vector
Construct a vector with n identical elements.
sourcepub fn count_leading_zeros(&self) -> usize
pub fn count_leading_zeros(&self) -> usize
Calculate the number of leading zeros for this vector.
sourcepub fn is_orthogonal(&self, vector: &Self) -> bool
pub fn is_orthogonal(&self, vector: &Self) -> bool
Determine whether two vectors are orthogonal.
sourcepub fn is_parallel(&self, vector: &Self) -> bool
pub fn is_parallel(&self, vector: &Self) -> bool
Determine whether two vectors are paralle.
Trait Implementations§
source§impl AddAssign<&Vector> for Vector
impl AddAssign<&Vector> for Vector
source§fn add_assign(&mut self, rhs: &Vector)
fn add_assign(&mut self, rhs: &Vector)
Performs the
+=
operation. Read moresource§impl MulAssign<Fraction> for Vector
impl MulAssign<Fraction> for Vector
source§fn mul_assign(&mut self, rhs: Fraction)
fn mul_assign(&mut self, rhs: Fraction)
Performs the
*=
operation. Read moresource§impl PartialEq for Vector
impl PartialEq for Vector
source§impl PartialOrd for Vector
impl PartialOrd for Vector
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl SubAssign<&Vector> for Vector
impl SubAssign<&Vector> for Vector
source§fn sub_assign(&mut self, rhs: &Vector)
fn sub_assign(&mut self, rhs: &Vector)
Performs the
-=
operation. Read moreimpl Eq for Vector
impl StructuralPartialEq for Vector
Auto Trait Implementations§
impl Freeze for Vector
impl RefUnwindSafe for Vector
impl Send for Vector
impl Sync for Vector
impl Unpin for Vector
impl UnwindSafe for Vector
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