Trait EdgeTrait

Source
pub trait EdgeTrait {
    type Weight;

    // Required methods
    fn from(&self) -> usize;
    fn to(&self) -> usize;
    fn weight(&self) -> Self::Weight;
    fn rev(self) -> Self;
}
Expand description

Graphにもたせる辺の満たすトレイト。

Required Associated Types§

Source

type Weight

辺の重みの型

Required Methods§

Source

fn from(&self) -> usize

辺の始点

Source

fn to(&self) -> usize

辺の終点

Source

fn weight(&self) -> Self::Weight

辺の重み

Source

fn rev(self) -> 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.

Implementors§

Source§

impl<T: Clone, I> EdgeTrait for Edge<T, I>