pub struct SievedArray<P, V> { /* private fields */ }Expand description
Implementations§
Source§impl<P, V> SievedArray<P, V>
impl<P, V> SievedArray<P, V>
Sourcepub fn try_get(&self, p: PointId) -> Result<&[V], MeshSieveError>
pub fn try_get(&self, p: PointId) -> Result<&[V], MeshSieveError>
Get a read-only slice for the given point, or an error if not present.
Sourcepub fn try_get_mut(&mut self, p: PointId) -> Result<&mut [V], MeshSieveError>
pub fn try_get_mut(&mut self, p: PointId) -> Result<&mut [V], MeshSieveError>
Get a mutable slice for the given point, or an error if not present.
Sourcepub fn try_iter_in_order(
&self,
) -> impl Iterator<Item = Result<(PointId, &[V]), MeshSieveError>> + '_
pub fn try_iter_in_order( &self, ) -> impl Iterator<Item = Result<(PointId, &[V]), MeshSieveError>> + '_
Source§impl<P, V: Clone> SievedArray<P, V>
impl<P, V: Clone> SievedArray<P, V>
Source§impl<P, V: Clone + Default> SievedArray<P, V>
impl<P, V: Clone + Default> SievedArray<P, V>
Sourcepub fn try_refine_with_sifter(
&mut self,
coarse: &SievedArray<P, V>,
refinement: &[(P, Vec<(P, Polarity)>)],
) -> Result<(), MeshSieveError>
pub fn try_refine_with_sifter( &mut self, coarse: &SievedArray<P, V>, refinement: &[(P, Vec<(P, Polarity)>)], ) -> Result<(), MeshSieveError>
Refine this array from a coarse array using a sifter (with orientations).
The refinement mapping must be a partial function from fine points to
coarse points; any fine point appearing more than once results in
[MeshSieveError::DuplicateRefinementTarget].
§Complexity
O(m · k), where m is the number of fine targets and k is slice length.
§Determinism
Serial: deterministic. Parallel: deterministic final state if refinement has no duplicate fine targets (duplicates are rejected). Writes occur after a read-only computation phase.
Sourcepub fn try_refine(
&mut self,
coarse: &SievedArray<P, V>,
refinement: &[(P, Vec<P>)],
) -> Result<(), MeshSieveError>
pub fn try_refine( &mut self, coarse: &SievedArray<P, V>, refinement: &[(P, Vec<P>)], ) -> Result<(), MeshSieveError>
Refine this array from a coarse array using a simple mapping (all forward), propagating errors.
§Complexity
O(m · k), where m is the number of fine targets and k is slice length.
§Determinism
Serial: deterministic. Parallel: deterministic final state if refinement has no duplicate fine targets (duplicates are rejected). Writes occur after a read-only computation phase.