Struct MaxOperation

Source
pub struct MaxOperation<T>
where T: Clone + Ord + Bounded,
{ /* private fields */ }
Expand description

binary operation to select larger element

Trait Implementations§

Source§

impl<T> Magma for MaxOperation<T>
where T: Clone + Ord + Bounded,

Source§

type T = T

type of operands: $T$
Source§

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

binary operaion: $\circ$
Source§

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

Source§

fn operate_assign(x: &mut Self::T, y: &Self::T)

Source§

impl<T> Unital for MaxOperation<T>
where T: Clone + Ord + Bounded,

Source§

fn unit() -> Self::T

identity element: $e$
Source§

fn is_unit(x: &Self::T) -> bool
where <Self as Magma>::T: PartialEq,

Source§

fn set_unit(x: &mut Self::T)

Source§

impl<T> Associative for MaxOperation<T>
where T: Clone + Ord + Bounded,

Source§

impl<T> Commutative for MaxOperation<T>
where T: Clone + Ord + Bounded,

Source§

impl<T> Idempotent for MaxOperation<T>
where T: Clone + Ord + Bounded,

Auto Trait Implementations§

§

impl<T> Freeze for MaxOperation<T>

§

impl<T> RefUnwindSafe for MaxOperation<T>

§

impl<T> Send for MaxOperation<T>

§

impl<T> Sync for MaxOperation<T>

§

impl<T> Unpin for MaxOperation<T>

§

impl<T> UnwindSafe for MaxOperation<T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<M> Monoid for M
where M: SemiGroup + Unital,

Source§

fn pow<E>(x: Self::T, exp: E) -> Self::T
where E: ExpBits,

binary exponentiation: $x^n = x\circ\ddots\circ x$
Source§

fn fold<I>(iter: I) -> Self::T
where I: IntoIterator<Item = Self::T>,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<M> AbelianMonoid for M
where M: Monoid + Commutative,

Source§

impl<M> IdempotentMonoid for M
where M: Monoid + Idempotent,

Source§

impl<S> SemiGroup for S
where S: Magma + Associative,