Skip to main content

Rank

Trait Rank 

Source
pub trait Rank {
    // Required methods
    fn dynamic_rank(&self) -> usize;
    fn type_rank() -> usize
       where Self: Sized;

    // Provided method
    fn rank(&self) -> usize { ... }
}
Expand description

get tensor rank

Required Methods§

Source

fn dynamic_rank(&self) -> usize

gets the rank

Source

fn type_rank() -> usize
where Self: Sized,

gets the rank at a type level. this may be some kind of default if there isn’t a clear rank associated with the type

Provided Methods§

Source

fn rank(&self) -> usize

gets the rank

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Rank for f32

Source§

impl<T: Rank> Rank for Vec<T>

Implementors§