Struct kmedoids::arrayadapter::LowerTriangle
source · [−]Expand description
Lower triangular matrix in serial form (without diagonal)
Example
let data = kmedoids::arrayadapter::LowerTriangle { n: 4, data: vec![1, 2, 3, 4, 5, 6] };
let mut meds = vec![0, 1];
let (loss, numswap, numiter, assignment): (f64, _, _, _) = kmedoids::fasterpam(&data, &mut meds, 10);
println!("Loss is {}", loss);
Fields
n: usize
Matrix size
data: Vec<N>
Trait Implementations
sourceimpl<N: Copy + Zero> ArrayAdapter<N> for LowerTriangle<N>
impl<N: Copy + Zero> ArrayAdapter<N> for LowerTriangle<N>
Adapter implementation for LowerTriangle
sourceimpl<N: Clone> Clone for LowerTriangle<N>
impl<N: Clone> Clone for LowerTriangle<N>
sourcefn clone(&self) -> LowerTriangle<N>
fn clone(&self) -> LowerTriangle<N>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations
impl<N> RefUnwindSafe for LowerTriangle<N>where
N: RefUnwindSafe,
impl<N> Send for LowerTriangle<N>where
N: Send,
impl<N> Sync for LowerTriangle<N>where
N: Sync,
impl<N> Unpin for LowerTriangle<N>where
N: Unpin,
impl<N> UnwindSafe for LowerTriangle<N>where
N: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more