pub struct FixedWavelengthSpectrum { /* private fields */ }Expand description
Validated fixed radiation components in input order.
Implementations§
Source§impl FixedWavelengthSpectrum
impl FixedWavelengthSpectrum
Sourcepub fn new(
wavelengths_angstrom: Vec<f64>,
relative_intensities: Vec<f64>,
) -> Result<Self, DomainError>
pub fn new( wavelengths_angstrom: Vec<f64>, relative_intensities: Vec<f64>, ) -> Result<Self, DomainError>
Validate and own fixed wavelength components.
§Errors
Returns DomainError::Radiation for invalid wavelengths or weights.
Sourcepub fn wavelengths_angstrom(&self) -> &[f64]
pub fn wavelengths_angstrom(&self) -> &[f64]
Borrow component wavelengths in ångströms.
Sourcepub fn relative_intensities(&self) -> &[f64]
pub fn relative_intensities(&self) -> &[f64]
Borrow component intensities relative to the first component.
Trait Implementations§
Source§impl Clone for FixedWavelengthSpectrum
impl Clone for FixedWavelengthSpectrum
Source§fn clone(&self) -> FixedWavelengthSpectrum
fn clone(&self) -> FixedWavelengthSpectrum
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FixedWavelengthSpectrum
impl Debug for FixedWavelengthSpectrum
Source§impl PartialEq for FixedWavelengthSpectrum
impl PartialEq for FixedWavelengthSpectrum
impl StructuralPartialEq for FixedWavelengthSpectrum
Auto Trait Implementations§
impl Freeze for FixedWavelengthSpectrum
impl RefUnwindSafe for FixedWavelengthSpectrum
impl Send for FixedWavelengthSpectrum
impl Sync for FixedWavelengthSpectrum
impl Unpin for FixedWavelengthSpectrum
impl UnsafeUnpin for FixedWavelengthSpectrum
impl UnwindSafe for FixedWavelengthSpectrum
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
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> ⓘ
Converts
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> ⓘ
Converts
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 more