Trait SortOp

Source
pub trait SortOp {
    // Required methods
    fn fast_argsort_asc<D: Dim>(&self, axis: D) -> Result<Tensor>;
    fn fast_sort_asc<D: Dim>(&self, axis: D) -> Result<Tensor>;
}
Expand description

Extension trait adding argsort / sort convenience calls on Tensor.

Required Methods§

Source

fn fast_argsort_asc<D: Dim>(&self, axis: D) -> Result<Tensor>

Returns the indices that would (ascending) sort the tensor along axis.

Source

fn fast_sort_asc<D: Dim>(&self, axis: D) -> Result<Tensor>

Returns the tensor’s values (ascending) sorted along axis.

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 SortOp for Tensor

Source§

fn fast_argsort_asc<D: Dim>(&self, axis: D) -> Result<Tensor>

Source§

fn fast_sort_asc<D: Dim>(&self, axis: D) -> Result<Tensor>

Implementors§