pub struct Eigenvector<T> { /* private fields */ }Expand description
A validated eigenvector coordinate container.
Implementations§
Source§impl<T> Eigenvector<T>
impl<T> Eigenvector<T>
Sourcepub fn new(coordinates: Vec<T>) -> Result<Self, EigenError>
pub fn new(coordinates: Vec<T>) -> Result<Self, EigenError>
Creates a new eigenvector from coordinate data.
§Errors
Returns EigenError::EmptyEigenvector when coordinates is empty.
Sourcepub fn try_new(coordinates: Vec<T>) -> Result<Self, EigenError>
pub fn try_new(coordinates: Vec<T>) -> Result<Self, EigenError>
Creates a new eigenvector from coordinate data.
§Errors
Returns EigenError::EmptyEigenvector when coordinates is empty.
Sourcepub fn from_coordinates(coordinates: Vec<T>) -> Result<Self, EigenError>
pub fn from_coordinates(coordinates: Vec<T>) -> Result<Self, EigenError>
Creates a new eigenvector from coordinate data.
§Errors
Returns EigenError::EmptyEigenvector when coordinates is empty.
Sourcepub fn coordinates(&self) -> &[T]
pub fn coordinates(&self) -> &[T]
Returns the stored coordinates.
Sourcepub fn into_inner(self) -> Vec<T>
pub fn into_inner(self) -> Vec<T>
Returns the stored coordinates.
Trait Implementations§
Source§impl<T> AsRef<[T]> for Eigenvector<T>
impl<T> AsRef<[T]> for Eigenvector<T>
Source§impl<T: Clone> Clone for Eigenvector<T>
impl<T: Clone> Clone for Eigenvector<T>
Source§fn clone(&self) -> Eigenvector<T>
fn clone(&self) -> Eigenvector<T>
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 moreSource§impl<T: Debug> Debug for Eigenvector<T>
impl<T: Debug> Debug for Eigenvector<T>
Source§impl<T: PartialEq> PartialEq for Eigenvector<T>
impl<T: PartialEq> PartialEq for Eigenvector<T>
Source§fn eq(&self, other: &Eigenvector<T>) -> bool
fn eq(&self, other: &Eigenvector<T>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<T: Eq> Eq for Eigenvector<T>
impl<T> StructuralPartialEq for Eigenvector<T>
Auto Trait Implementations§
impl<T> Freeze for Eigenvector<T>
impl<T> RefUnwindSafe for Eigenvector<T>where
T: RefUnwindSafe,
impl<T> Send for Eigenvector<T>where
T: Send,
impl<T> Sync for Eigenvector<T>where
T: Sync,
impl<T> Unpin for Eigenvector<T>where
T: Unpin,
impl<T> UnsafeUnpin for Eigenvector<T>
impl<T> UnwindSafe for Eigenvector<T>where
T: UnwindSafe,
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