Trait ratio_matrix::traits::Domain2D

source ·
pub trait Domain2D {
    // Required methods
    fn row_range(&self) -> Range<usize>;
    fn col_range(&self) -> Range<usize>;

    // Provided methods
    fn range(&self) -> MatrixRange { ... }
    fn start(&self) -> MatrixCoordinates { ... }
    fn end(&self) -> MatrixCoordinates { ... }
    fn middle(&self) -> (f64, f64) { ... }
}
Expand description

Domain in two directions.

Required Methods§

source

fn row_range(&self) -> Range<usize>

Range of rows included in this object’s domain.

source

fn col_range(&self) -> Range<usize>

Range of columns included in this object’s domain.

Provided Methods§

source

fn range(&self) -> MatrixRange

The area spanned by this domain.

source

fn start(&self) -> MatrixCoordinates

Starting coordinate of this domain (inclusive).

source

fn end(&self) -> MatrixCoordinates

Ending coordinate of this domain (exclusive).

source

fn middle(&self) -> (f64, f64)

The middle point of this cluster as a tuple of (rows, columns), fractional.

Implementations on Foreign Types§

source§

impl Domain2D for ((usize, usize), (usize, usize))

source§

impl Domain2D for (Range<usize>, Range<usize>)

Implementors§