petgraph::algo

Trait 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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so 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§