pub trait Argmax<T> {
// Required methods
fn argmax_write<Lx: Layout, S: Shape>(
&self,
x: &Slice<T, S, Lx>,
output: &mut Vec<usize>,
) -> bool;
fn argmax_abs_write<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 of any rank.
Implementations define the ordering and magnitude semantics they support for T;
backend impl bounds should state any Rust scalar traits they rely on.
Required Methods§
fn argmax_write<Lx: Layout, S: Shape>( &self, x: &Slice<T, S, Lx>, output: &mut Vec<usize>, ) -> bool
fn argmax_abs_write<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".