pub trait Argmax<T: ComplexFloat + PartialOrd> {
// Required methods
fn argmax_overwrite<Lx: Layout, S: Shape>(
&self,
x: &Slice<T, S, Lx>,
output: &mut Vec<usize>,
) -> bool;
fn argmax_abs_overwrite<Lx: Layout, S: Shape>(
&self,
x: &Slice<T, S, Lx>,
output: &mut Vec<usize>,
) -> bool;
fn argmax<Lx: Layout, S: Shape>(
&self,
x: &Slice<T, S, Lx>,
) -> Option<Vec<usize>>;
fn argmax_abs<Lx: Layout, S: Shape>(
&self,
x: &Slice<T, S, Lx>,
) -> Option<Vec<usize>>;
}Expand description
Argmax for tensors, unlike other traits: it requires T: PartialOrd and works on tensor of any rank.
Required Methods§
fn argmax_overwrite<Lx: Layout, S: Shape>( &self, x: &Slice<T, S, Lx>, output: &mut Vec<usize>, ) -> bool
fn argmax_abs_overwrite<Lx: Layout, S: Shape>( &self, x: &Slice<T, S, Lx>, output: &mut Vec<usize>, ) -> bool
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.