pub struct LatticeReflectionDomain { /* private fields */ }Expand description
Bounded monochromatic reflection topology with stable intensity transfer.
Implementations§
Source§impl LatticeReflectionDomain
impl LatticeReflectionDomain
Sourcepub fn new(
parameterization: LatticeParameterization,
bounds: LatticeBounds,
wavelength_angstrom: f64,
visible_two_theta_deg: [f64; 2],
initial_intensity: f64,
merge_friedel: bool,
max_candidates: usize,
guard_scale: f64,
) -> Result<Self, LatticeError>
pub fn new( parameterization: LatticeParameterization, bounds: LatticeBounds, wavelength_angstrom: f64, visible_two_theta_deg: [f64; 2], initial_intensity: f64, merge_friedel: bool, max_candidates: usize, guard_scale: f64, ) -> Result<Self, LatticeError>
Validate and own one bounded reflection-domain contract.
§Errors
Returns LatticeError for invalid scalar or bound state.
Sourcepub const fn parameterization(&self) -> &LatticeParameterization
pub const fn parameterization(&self) -> &LatticeParameterization
Borrow the parameterization.
Sourcepub const fn bounds(&self) -> &LatticeBounds
pub const fn bounds(&self) -> &LatticeBounds
Borrow finite lattice bounds.
Sourcepub const fn wavelength_angstrom(&self) -> f64
pub const fn wavelength_angstrom(&self) -> f64
Return the monochromatic wavelength.
Sourcepub const fn visible_two_theta_deg(&self) -> [f64; 2]
pub const fn visible_two_theta_deg(&self) -> [f64; 2]
Return the visible two-theta interval in degrees.
Sourcepub const fn initial_intensity(&self) -> f64
pub const fn initial_intensity(&self) -> f64
Return the initial value assigned to newly generated families.
Sourcepub const fn merge_friedel(&self) -> bool
pub const fn merge_friedel(&self) -> bool
Return whether Friedel pairs are merged.
Sourcepub const fn max_candidates(&self) -> usize
pub const fn max_candidates(&self) -> usize
Return the reflection-candidate resource ceiling.
Sourcepub const fn guard_scale(&self) -> f64
pub const fn guard_scale(&self) -> f64
Return the conservative reflection-guard scale.
Sourcepub fn with_wavelength(
&self,
wavelength_angstrom: f64,
) -> Result<Self, LatticeError>
pub fn with_wavelength( &self, wavelength_angstrom: f64, ) -> Result<Self, LatticeError>
Clone this guarded contract for another monochromatic wavelength.
§Errors
Returns LatticeError when the wavelength is invalid or the updated
guard cannot cover the declared lattice box.
Sourcepub fn validate_cell(&self, cell: UnitCell) -> Result<Vec<f64>, LatticeError>
pub fn validate_cell(&self, cell: UnitCell) -> Result<Vec<f64>, LatticeError>
Validate a compatible cell inside the finite guard box.
§Errors
Returns LatticeError for an incompatible or out-of-bounds cell.
Sourcepub fn generate(
&self,
cell: UnitCell,
previous: Option<&BTreeMap<String, f64>>,
) -> Result<GeneratedLatticeDomain, LatticeError>
pub fn generate( &self, cell: UnitCell, previous: Option<&BTreeMap<String, f64>>, ) -> Result<GeneratedLatticeDomain, LatticeError>
Generate guarded topology and transfer intensities by stable ID.
§Errors
Returns LatticeError for an incompatible cell or generation failure.
Trait Implementations§
Source§impl Clone for LatticeReflectionDomain
impl Clone for LatticeReflectionDomain
Source§fn clone(&self) -> LatticeReflectionDomain
fn clone(&self) -> LatticeReflectionDomain
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 LatticeReflectionDomain
impl Debug for LatticeReflectionDomain
Source§impl PartialEq for LatticeReflectionDomain
impl PartialEq for LatticeReflectionDomain
impl StructuralPartialEq for LatticeReflectionDomain
Auto Trait Implementations§
impl Freeze for LatticeReflectionDomain
impl RefUnwindSafe for LatticeReflectionDomain
impl Send for LatticeReflectionDomain
impl Sync for LatticeReflectionDomain
impl Unpin for LatticeReflectionDomain
impl UnsafeUnpin for LatticeReflectionDomain
impl UnwindSafe for LatticeReflectionDomain
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.