Struct demes::InputProportion
source · pub struct InputProportion(/* private fields */);
Expand description
Input value for Proportion
, used when loading or building graphs.
§Examples
let t = demes::InputProportion::from(1.0);
assert_eq!(t, 1.0);
let t = t - 1.0;
assert_eq!(t, 0.0);
let t = 1.0 + t;
assert_eq!(t, 1.0);
Trait Implementations§
source§impl Add<InputProportion> for f64
impl Add<InputProportion> for f64
source§impl Add<f64> for InputProportion
impl Add<f64> for InputProportion
source§impl Add for InputProportion
impl Add for InputProportion
source§impl Clone for InputProportion
impl Clone for InputProportion
source§fn clone(&self) -> InputProportion
fn clone(&self) -> InputProportion
Returns a copy of the value. Read more
1.0.0 · 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 InputProportion
impl Debug for InputProportion
source§impl<'de> Deserialize<'de> for InputProportion
impl<'de> Deserialize<'de> for InputProportion
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Div<InputProportion> for f64
impl Div<InputProportion> for f64
source§impl Div<f64> for InputProportion
impl Div<f64> for InputProportion
source§impl Div for InputProportion
impl Div for InputProportion
source§impl From<&f64> for InputProportion
impl From<&f64> for InputProportion
source§impl From<InputProportion> for f64
impl From<InputProportion> for f64
source§fn from(value: InputProportion) -> Self
fn from(value: InputProportion) -> Self
Converts to this type from the input type.
source§impl From<f64> for InputProportion
impl From<f64> for InputProportion
source§impl Mul<InputProportion> for f64
impl Mul<InputProportion> for f64
source§impl Mul<f64> for InputProportion
impl Mul<f64> for InputProportion
source§impl Mul for InputProportion
impl Mul for InputProportion
source§impl PartialEq<InputProportion> for f64
impl PartialEq<InputProportion> for f64
source§fn eq(&self, other: &InputProportion) -> bool
fn eq(&self, other: &InputProportion) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<f64> for InputProportion
impl PartialEq<f64> for InputProportion
source§impl PartialEq for InputProportion
impl PartialEq for InputProportion
source§fn eq(&self, other: &InputProportion) -> bool
fn eq(&self, other: &InputProportion) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for InputProportion
impl PartialOrd for InputProportion
source§fn partial_cmp(&self, other: &InputProportion) -> Option<Ordering>
fn partial_cmp(&self, other: &InputProportion) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for InputProportion
impl Serialize for InputProportion
source§impl Sub<InputProportion> for f64
impl Sub<InputProportion> for f64
source§impl Sub<f64> for InputProportion
impl Sub<f64> for InputProportion
source§impl Sub for InputProportion
impl Sub for InputProportion
source§impl TryFrom<InputProportion> for Proportion
impl TryFrom<InputProportion> for Proportion
§type Error = DemesError
type Error = DemesError
The type returned in the event of a conversion error.
impl Copy for InputProportion
impl StructuralPartialEq for InputProportion
Auto Trait Implementations§
impl Freeze for InputProportion
impl RefUnwindSafe for InputProportion
impl Send for InputProportion
impl Sync for InputProportion
impl Unpin for InputProportion
impl UnwindSafe for InputProportion
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