Trait 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§