pub enum Metric {
Euclidean,
Manhattan,
}Expand description
The distance metric used by spatial functions (igraph_metric_t).
Variants§
Euclidean
The Euclidean (L2) distance, sqrt(Σ (x_i - y_i)²).
Manhattan
The Manhattan (L1, taxicab) distance, Σ |x_i - y_i|.
Implementations§
Trait Implementations§
impl Copy for Metric
impl Eq for Metric
Source§impl From<Metric> for igraph_metric_t
impl From<Metric> for igraph_metric_t
Source§fn from(value: Metric) -> igraph_metric_t
fn from(value: Metric) -> igraph_metric_t
Converts to this type from the input type.
impl StructuralPartialEq for Metric
Auto Trait Implementations§
impl Freeze for Metric
impl RefUnwindSafe for Metric
impl Send for Metric
impl Sync for Metric
impl Unpin for Metric
impl UnsafeUnpin for Metric
impl UnwindSafe for Metric
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