pub struct Inputs<'a> {
pub condition: &'a Array2<f32>,
pub mask: &'a Array2<bool>,
pub traversal: Option<&'a Array2<f32>>,
pub transgrids: Option<&'a [Array3<f32>]>,
pub transforms: &'a HashMap<i32, Affine>,
}Expand description
Borrowed arrays of one tile for connectivity. 2-D arrays share the (rows, cols)
shape of condition.
Fields§
§condition: &'a Array2<f32>Habitat condition, expected in [0, 1] with higher values for better condition. It sets
each destination’s value and habitat area, and the path weights unless traversal is
given. NaN cells are left out of habitat area and of the graph; coarser overview cells
average the finite cells they contain.
mask: &'a Array2<bool>true skips a focal cell, whose output stays NaN. Masked cells with finite condition
still serve as destinations and path cells. Under Config::pa_to_pa, false also
marks protected cells. Unmasked cells with NaN condition reach nothing and score 0, so
callers normally mask them.
traversal: Option<&'a Array2<f32>>Optional traversal values in [0, 1], high for easy passage (e.g. 1 - resistance),
used only for path weights. None uses condition; cells whose traversal overview is
NaN fall back to condition.
transgrids: Option<&'a [Array3<f32>]>BERI scenarios: the current climate first, then future scenarios. Each array is
(rows, cols, bands) with condition’s rows and columns and the same bands in the same
order; any memory layout works, e.g. a band-major view. A cell whose bands are not all
finite has similarity 0. None or an empty slice computes connectedness instead.
transforms: &'a HashMap<i32, Affine>Transform of each level’s grid, keyed by level; see level_transforms.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Inputs<'a>
impl<'a> RefUnwindSafe for Inputs<'a>
impl<'a> Send for Inputs<'a>
impl<'a> Sync for Inputs<'a>
impl<'a> Unpin for Inputs<'a>
impl<'a> UnsafeUnpin for Inputs<'a>
impl<'a> UnwindSafe for Inputs<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more