Trait petgraph::algo::UnitMeasure

source ·
pub trait UnitMeasure: Measure + Sub<Self, Output = Self> + Mul<Self, Output = Self> + Div<Self, Output = Self> + Sum {
    // Required methods
    fn zero() -> Self;
    fn one() -> Self;
    fn from_usize(nb: usize) -> Self;
    fn default_tol() -> Self;
}
Expand description

A floating-point measure that can be computed from usize and with a default measure of proximity.

Required Methods§

source

fn zero() -> Self

source

fn one() -> Self

source

fn from_usize(nb: usize) -> Self

source

fn default_tol() -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl UnitMeasure for f32

source§

fn zero() -> Self

source§

fn one() -> Self

source§

fn from_usize(nb: usize) -> Self

source§

fn default_tol() -> Self

source§

impl UnitMeasure for f64

source§

fn zero() -> Self

source§

fn one() -> Self

source§

fn from_usize(nb: usize) -> Self

source§

fn default_tol() -> Self

Implementors§