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::itself::*,
    power_semigroup::pow_semigroup,
};

pub trait PowSemigroup<I>: Semigroup<I>
where
    Self: Clone,
{
    fn pow_seimigroup(
        self,
        exp: u64,
    ) -> Self {
        pow_semigroup(&Self::op, self, exp)
    }
}

impl<S: Semigroup<I> + Clone, I> PowSemigroup<I> for S {}