Trait DijkstraWeight

Source
pub trait DijkstraWeight:
    Ord
    + Add<Output = Self>
    + Sized
    + Clone {
    // Required methods
    fn infinity() -> Self;
    fn zero() -> Self;
}
Expand description

A weight-type usable in Dijkstra’s algorithm.

Required Methods§

Source

fn infinity() -> Self

The infinity value of this type.

Source

fn zero() -> Self

The zero value of this type.

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 DijkstraWeight for i8

Source§

fn infinity() -> Self

Source§

fn zero() -> Self

Source§

impl DijkstraWeight for i16

Source§

fn infinity() -> Self

Source§

fn zero() -> Self

Source§

impl DijkstraWeight for i32

Source§

fn infinity() -> Self

Source§

fn zero() -> Self

Source§

impl DijkstraWeight for i64

Source§

fn infinity() -> Self

Source§

fn zero() -> Self

Source§

impl DijkstraWeight for i128

Source§

fn infinity() -> Self

Source§

fn zero() -> Self

Source§

impl DijkstraWeight for isize

Source§

fn infinity() -> Self

Source§

fn zero() -> Self

Source§

impl DijkstraWeight for u8

Source§

fn infinity() -> Self

Source§

fn zero() -> Self

Source§

impl DijkstraWeight for u16

Source§

fn infinity() -> Self

Source§

fn zero() -> Self

Source§

impl DijkstraWeight for u32

Source§

fn infinity() -> Self

Source§

fn zero() -> Self

Source§

impl DijkstraWeight for u64

Source§

fn infinity() -> Self

Source§

fn zero() -> Self

Source§

impl DijkstraWeight for u128

Source§

fn infinity() -> Self

Source§

fn zero() -> Self

Source§

impl DijkstraWeight for usize

Source§

fn infinity() -> Self

Source§

fn zero() -> Self

Implementors§