Skip to main content

InverseStencilChain

Struct InverseStencilChain 

Source
pub struct InverseStencilChain { /* private fields */ }
Expand description

Per-level inverse maps for a multi-level refinement.

level_stencils[k] maps level-k vertices to level-(k+1) vertices, so the inverse of level k maps a changed set in level-k space to the affected set in level-(k+1) space. affected_outputs threads a base-cage change set forward through every level to the final-level outputs it touches – equivalent to inverting the composed table, but without paying the composition cost.

The chain is topology-only: build it once when the stencils are built and reuse it across every position edit.

Implementations§

Source§

impl InverseStencilChain

Source

pub fn level_count(&self) -> usize

Number of refinement levels in the chain.

Source

pub fn affected_outputs(&self, changed_base_inputs: &[u32]) -> Vec<u32>

Final-level output rows affected by changing the given base-level input (control) points, sorted ascending with duplicates removed.

With no levels the chain is the identity: the affected outputs are the changed inputs themselves.

Source

pub fn affected_outputs_into( &self, changed_base_inputs: &[u32], scratch: &mut AffectedScratch, out: &mut Vec<u32>, )

Like affected_outputs but writes into out (cleared first) and reuses scratch, so a hot edit loop allocates nothing after the scratch has warmed up. Same sorted, deduped result.

Trait Implementations§

Source§

impl Clone for InverseStencilChain

Source§

fn clone(&self) -> InverseStencilChain

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for InverseStencilChain

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> From<&'a [StencilTable]> for InverseStencilChain

Source§

fn from(level_stencils: &'a [StencilTable]) -> Self

Build per-level inverse maps from a refinement’s per-level stencil tables (e.g. RefinementResult::level_stencils).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,