pub trait TreeMonoid {
    type T: Clone + Debug;
    type W: Clone;

    // Required methods
    fn id() -> Self::T;
    fn merge(x: &Self::T, y: &Self::T) -> Self::T;
    fn put_edge(x: &Self::T, weight: &Self::W) -> Self::T;
}

Required Associated Types§

source

type T: Clone + Debug

データの型

source

type W: Clone

辺重みの型

Required Methods§

source

fn id() -> Self::T

単位元を返す関数

source

fn merge(x: &Self::T, y: &Self::T) -> Self::T

値同士の合成

source

fn put_edge(x: &Self::T, weight: &Self::W) -> Self::T

辺の作用

Implementors§