pub struct Mapping {
pub dims: Vec<usize>,
pub positions: Positions,
pub frame: Frame,
pub cell: CellConvention,
pub provenance: String,
}Expand description
Positions for a subset of a domain’s dims, and the frame they are in.
Fields§
§dims: Vec<usize>Indices into the domain’s dims, in the order positions expects.
For Positions::Affine this is [row_dim, col_dim].
positions: Positions§frame: Frame§cell: CellConvention§provenance: StringWhere this mapping came from: "stored" for what a reader found, or
the name of the step that derived it (such as "normalise").
Implementations§
Source§impl Mapping
impl Mapping
pub fn new(dims: Vec<usize>, positions: Positions, frame: Frame) -> Self
pub fn with_cell(self, cell: CellConvention) -> Self
pub fn with_provenance(self, provenance: impl Into<String>) -> Self
pub fn rung(&self) -> Rung
Sourcepub fn position(&self, index: &[f64]) -> Option<Vec<f64>>
pub fn position(&self, index: &[f64]) -> Option<Vec<f64>>
The position at a continuous index, one value per covered dim in
self.dims order (see the crate docs for the index convention).
Returns one value per output coordinate, or None where the mapping
cannot place the index (R0, outside a curvilinear grid, or a rung
not evaluated in S1).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Mapping
impl !UnwindSafe for Mapping
impl Freeze for Mapping
impl Send for Mapping
impl Sync for Mapping
impl Unpin for Mapping
impl UnsafeUnpin for Mapping
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
Mutably borrows from an owned value. Read more