pub struct F64VectorView<'a> { /* private fields */ }Expand description
Borrowed strided f64 vector view.
Implementations§
Source§impl<'a> F64VectorView<'a>
impl<'a> F64VectorView<'a>
Sourcepub const fn contiguous(data: &'a [f64]) -> Self
pub const fn contiguous(data: &'a [f64]) -> Self
Contiguous vector view over data.
Sourcepub fn strided(
data: &'a [f64],
len: usize,
stride: usize,
) -> Result<Self, ViewError>
pub fn strided( data: &'a [f64], len: usize, stride: usize, ) -> Result<Self, ViewError>
Strided view. The underlying slice must contain at least
(len.saturating_sub(1)) * stride + 1 elements when len > 0.
§Errors
Returns ViewError::InvalidShape when the slice is too short.
Sourcepub const fn is_contiguous(self) -> bool
pub const fn is_contiguous(self) -> bool
Whether the view is unit-stride contiguous over len elements.
Sourcepub unsafe fn get_unchecked(self, i: usize) -> f64
pub unsafe fn get_unchecked(self, i: usize) -> f64
Unchecked element access for hot loops after bounds are established.
§Safety
Caller must ensure i < self.len.
Trait Implementations§
Source§impl<'a> Clone for F64VectorView<'a>
impl<'a> Clone for F64VectorView<'a>
Source§fn clone(&self) -> F64VectorView<'a>
fn clone(&self) -> F64VectorView<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for F64VectorView<'a>
Auto Trait Implementations§
impl<'a> Freeze for F64VectorView<'a>
impl<'a> RefUnwindSafe for F64VectorView<'a>
impl<'a> Send for F64VectorView<'a>
impl<'a> Sync for F64VectorView<'a>
impl<'a> Unpin for F64VectorView<'a>
impl<'a> UnsafeUnpin for F64VectorView<'a>
impl<'a> UnwindSafe for F64VectorView<'a>
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