Skip to main content

AxisOrder

Trait AxisOrder 

Source
pub trait AxisOrder: Sealed {
    const CHANNEL_AXIS: usize;

    // Required methods
    fn channels(dim: (usize, usize)) -> usize;
    fn frames(dim: (usize, usize)) -> usize;
    fn index(channel: usize, frame: usize) -> (usize, usize);
}
Expand description

Axis-order marker describing how the two array axes map to channels and frames.

Required Associated Constants§

Source

const CHANNEL_AXIS: usize

The array axis (0 or 1) along which the channel index runs.

Required Methods§

Source

fn channels(dim: (usize, usize)) -> usize

Number of channels for an array of the given shape.

Source

fn frames(dim: (usize, usize)) -> usize

Number of frames for an array of the given shape.

Source

fn index(channel: usize, frame: usize) -> (usize, usize)

Map a (channel, frame) pair to an ndarray (row, column) index.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§