pub struct DistanceMatrix { /* private fields */ }
Expand description
A matrix representing the distances between pairs of items.
Implementations§
Source§impl DistanceMatrix
impl DistanceMatrix
Sourcepub fn try_from_square(
matrix: Vec<Vec<f64>>,
) -> Result<Self, DistanceMatrixError>
pub fn try_from_square( matrix: Vec<Vec<f64>>, ) -> Result<Self, DistanceMatrixError>
Create a new DistanceMatrix
from a square matrix.
§Errors
Returns an error if the input matrix is not square.
Sourcepub fn into_inner(self) -> Vec<Vec<f64>>
pub fn into_inner(self) -> Vec<Vec<f64>>
Consumes the DistanceMatrix
and returns the inner matrix.
Trait Implementations§
Source§impl Clone for DistanceMatrix
impl Clone for DistanceMatrix
Source§fn clone(&self) -> DistanceMatrix
fn clone(&self) -> DistanceMatrix
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DistanceMatrix
impl Debug for DistanceMatrix
Source§impl Index<usize> for DistanceMatrix
impl Index<usize> for DistanceMatrix
Source§impl IntoIterator for DistanceMatrix
impl IntoIterator for DistanceMatrix
Auto Trait Implementations§
impl Freeze for DistanceMatrix
impl RefUnwindSafe for DistanceMatrix
impl Send for DistanceMatrix
impl Sync for DistanceMatrix
impl Unpin for DistanceMatrix
impl UnwindSafe for DistanceMatrix
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