dsalgo 0.3.10

A package for Datastructures and Algorithms.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::{
    algebraic_structure::*,
    power_monoid::*,
};

pub trait PowMonoid: Monoid
where
    Self::S: Clone,
{
    fn pow_monoid(
        x: Self::S,
        exp: u64,
    ) -> Self::S {
        pow_monoid(&Self::op, &Self::e, x, exp)
    }
}

impl<T: Monoid> PowMonoid for T where T::S: Clone {}