pub struct BVector<T: SimdRealField + Copy, const N: usize> {
pub data_vector: SVector<T, N>,
}Expand description
This module provides a vector type BVector that is optimized for compile-time
dimension and uses SIMD operations for performance.
Fields§
§data_vector: SVector<T, N>Implementations§
Source§impl<T: SimdRealField + Copy, const N: usize> BVector<T, N>
impl<T: SimdRealField + Copy, const N: usize> BVector<T, N>
Sourcepub fn from_element(element: T) -> Self
pub fn from_element(element: T) -> Self
Constructs a vector filled with element of a dimension N.
Sourcepub fn from_array(data: [T; N]) -> Selfwhere
T: Copy,
pub fn from_array(data: [T; N]) -> Selfwhere
T: Copy,
Constructs the vector from fixed-size array.
pub fn dot(&self, other: &Self) -> T
pub fn len(&self) -> usize
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Whether the vector has no elements, which is only the case when N is 0.
pub fn get(&self, index: usize) -> T
Trait Implementations§
impl<T: PartialEq + SimdRealField + Copy, const N: usize> StructuralPartialEq for BVector<T, N>
Auto Trait Implementations§
impl<T, const N: usize> Freeze for BVector<T, N>
impl<T, const N: usize> RefUnwindSafe for BVector<T, N>
impl<T, const N: usize> Send for BVector<T, N>
impl<T, const N: usize> Sync for BVector<T, N>
impl<T, const N: usize> Unpin for BVector<T, N>
impl<T, const N: usize> UnsafeUnpin for BVector<T, N>
impl<T, const N: usize> UnwindSafe for BVector<T, N>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.