Trait ArrayIterArgmax

Source
pub trait ArrayIterArgmax<T>: ArrayIter<T>{
    // Provided methods
    fn argmax(&self) -> Option<usize> { ... }
    fn non_zero_argmax(&self) -> Option<usize> { ... }
}

Provided Methods§

Source

fn argmax(&self) -> Option<usize>

Returns the index of the element with the largest value.

Source

fn non_zero_argmax(&self) -> Option<usize>

Returns the index of the element with the largest value that is not equal to the default value.

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.

Implementations on Foreign Types§

Source§

impl<T: PartialOrd + Default, const N: usize> ArrayIterArgmax<T> for [T; N]

Implementors§