pub struct RietveldStructuralLayout { /* private fields */ }Expand description
Ordered physical parameters and exact transforms to/from engine layouts.
Implementations§
Source§impl RietveldStructuralLayout
impl RietveldStructuralLayout
Sourcepub fn new(
phases: &[RietveldPhase],
selection: RietveldStructuralSelection,
lattice_bounds: &[Option<LatticeBounds>],
) -> Result<Self, RietveldParameterError>
pub fn new( phases: &[RietveldPhase], selection: RietveldStructuralSelection, lattice_bounds: &[Option<LatticeBounds>], ) -> Result<Self, RietveldParameterError>
Build stable keys, bounds, scaling, and analytical engine transforms.
lattice_bounds must have one entry per phase. A selected lattice
requires bounds; an unselected lattice ignores a missing entry.
§Errors
Returns RietveldParameterError for shape, lattice, identity, or
parameter-domain failures.
Sourcepub const fn parameters(&self) -> &ParameterSet
pub const fn parameters(&self) -> &ParameterSet
Borrow ordered physical parameter specifications.
Sourcepub fn coordinate_models(&self) -> &[Vec<SiteCoordinateModel>]
pub fn coordinate_models(&self) -> &[Vec<SiteCoordinateModel>]
Borrow symmetry-allowed site models in phase/site order.
Sourcepub fn apply_values(
&self,
phases: &[RietveldPhase],
values: &[f64],
) -> Result<Vec<RietveldPhase>, RietveldParameterError>
pub fn apply_values( &self, phases: &[RietveldPhase], values: &[f64], ) -> Result<Vec<RietveldPhase>, RietveldParameterError>
Install physical parameter values into cloned phase definitions.
§Errors
Returns RietveldParameterError for stale phase identities, a wrong
value count, invalid lattice/site values, or a rejected phase domain.
Sourcepub fn apply_value_change(
&self,
phases: &[RietveldPhase],
current_values: &[f64],
values: &[f64],
) -> Result<Vec<RietveldPhase>, RietveldParameterError>
pub fn apply_value_change( &self, phases: &[RietveldPhase], current_values: &[f64], values: &[f64], ) -> Result<Vec<RietveldPhase>, RietveldParameterError>
Install a change between two absolute physical parameter states.
Special-position coordinates are local tangent coordinates, so only their difference is applied to the current phase. All other selected values are installed absolutely.
§Errors
Returns RietveldParameterError for stale phase identities, wrong
value counts, invalid values, or a rejected phase domain.
Sourcepub fn native_tangents(
&self,
direction: &[f64],
) -> Result<Vec<Vec<f64>>, RietveldParameterError>
pub fn native_tangents( &self, direction: &[f64], ) -> Result<Vec<Vec<f64>>, RietveldParameterError>
Expand one physical parameter direction into native per-phase tangents.
§Errors
Returns RietveldParameterError::DirectionLengthMismatch for a wrong
global direction length.
Sourcepub fn project_native_gradients(
&self,
gradients: &[&[f64]],
) -> Result<Vec<f64>, RietveldParameterError>
pub fn project_native_gradients( &self, gradients: &[&[f64]], ) -> Result<Vec<f64>, RietveldParameterError>
Project native per-phase reverse products into physical parameter order.
§Errors
Returns RietveldParameterError for phase or native-gradient shape
mismatches.
Sourcepub fn project_native_jacobians(
&self,
jacobians: &[(&[f64], usize)],
sample_count: usize,
) -> Result<Vec<f64>, RietveldParameterError>
pub fn project_native_jacobians( &self, jacobians: &[(&[f64], usize)], sample_count: usize, ) -> Result<Vec<f64>, RietveldParameterError>
Project parameter-major native phase Jacobians into physical parameter order.
§Errors
Returns RietveldParameterError for phase, native-row, sample, or
allocation shape mismatches.
Trait Implementations§
Source§impl Clone for RietveldStructuralLayout
impl Clone for RietveldStructuralLayout
Source§fn clone(&self) -> RietveldStructuralLayout
fn clone(&self) -> RietveldStructuralLayout
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RietveldStructuralLayout
impl Debug for RietveldStructuralLayout
Source§impl PartialEq for RietveldStructuralLayout
impl PartialEq for RietveldStructuralLayout
impl StructuralPartialEq for RietveldStructuralLayout
Auto Trait Implementations§
impl Freeze for RietveldStructuralLayout
impl RefUnwindSafe for RietveldStructuralLayout
impl Send for RietveldStructuralLayout
impl Sync for RietveldStructuralLayout
impl Unpin for RietveldStructuralLayout
impl UnsafeUnpin for RietveldStructuralLayout
impl UnwindSafe for RietveldStructuralLayout
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.