Struct extendr_api::scalar::Rfloat
source · #[repr(C)]pub struct Rfloat(pub f64);
Expand description
Rfloat is a wrapper for f64 in the context of an R’s integer vector.
Rfloat has a special NA value, obtained from R headers via R_NaReal.
Rfloat has the same footprint as an f64 value allowing us to use it in zero copy slices.
Tuple Fields§
§0: f64
Implementations§
Trait Implementations§
source§impl AddAssign<Rfloat> for &mut Rfloat
impl AddAssign<Rfloat> for &mut Rfloat
source§fn add_assign(&mut self, other: Rfloat)
fn add_assign(&mut self, other: Rfloat)
Add two Rfloat values or an option of f64, modifying the left-hand side in place. Overflows to NA.
source§impl AddAssign<Rfloat> for Option<f64>
impl AddAssign<Rfloat> for Option<f64>
source§fn add_assign(&mut self, other: Rfloat)
fn add_assign(&mut self, other: Rfloat)
Add two Rfloat values or an option of f64, modifying the left-hand side in place. Overflows to NA.
source§impl AddAssign<Rfloat> for Rfloat
impl AddAssign<Rfloat> for Rfloat
source§fn add_assign(&mut self, other: Rfloat)
fn add_assign(&mut self, other: Rfloat)
Add two Rfloat values or an option of f64, modifying the left-hand side in place. Overflows to NA.
source§impl AddAssign<f64> for &mut Rfloat
impl AddAssign<f64> for &mut Rfloat
source§fn add_assign(&mut self, other: f64)
fn add_assign(&mut self, other: f64)
Add two Rfloat values or an option of f64, modifying the left-hand side in place. Overflows to NA.
source§impl AddAssign<f64> for Rfloat
impl AddAssign<f64> for Rfloat
source§fn add_assign(&mut self, other: f64)
fn add_assign(&mut self, other: f64)
Add two Rfloat values or an option of f64, modifying the left-hand side in place. Overflows to NA.
source§impl<'a> AsTypedSlice<'a, Rfloat> for Robjwhere
Self: 'a,
impl<'a> AsTypedSlice<'a, Rfloat> for Robjwhere Self: 'a,
fn as_typed_slice(&self) -> Option<&'a [Rfloat]>
fn as_typed_slice_mut(&mut self) -> Option<&'a mut [Rfloat]>
source§impl CanBeNA for Rfloat
impl CanBeNA for Rfloat
use extendr_api::prelude::*;
test! {
assert!((<Rfloat>::na()).is_na());
}
source§impl Default for Rfloat
impl Default for Rfloat
use extendr_api::prelude::*;
test! {
assert_eq!(<Rfloat>::default(), <f64>::default());
}
source§impl DivAssign<Rfloat> for &mut Rfloat
impl DivAssign<Rfloat> for &mut Rfloat
source§fn div_assign(&mut self, other: Rfloat)
fn div_assign(&mut self, other: Rfloat)
Divide two Rfloat values or an option of f64, modifying the left-hand side in place. Overflows to NA.
source§impl DivAssign<Rfloat> for Option<f64>
impl DivAssign<Rfloat> for Option<f64>
source§fn div_assign(&mut self, other: Rfloat)
fn div_assign(&mut self, other: Rfloat)
Divide two Rfloat values or an option of f64, modifying the left-hand side in place. Overflows to NA.
source§impl DivAssign<Rfloat> for Rfloat
impl DivAssign<Rfloat> for Rfloat
source§fn div_assign(&mut self, other: Rfloat)
fn div_assign(&mut self, other: Rfloat)
Divide two Rfloat values or an option of f64, modifying the left-hand side in place. Overflows to NA.
source§impl DivAssign<f64> for &mut Rfloat
impl DivAssign<f64> for &mut Rfloat
source§fn div_assign(&mut self, other: f64)
fn div_assign(&mut self, other: f64)
Divide two Rfloat values or an option of f64, modifying the left-hand side in place. Overflows to NA.
source§impl DivAssign<f64> for Rfloat
impl DivAssign<f64> for Rfloat
source§fn div_assign(&mut self, other: f64)
fn div_assign(&mut self, other: f64)
Divide two Rfloat values or an option of f64, modifying the left-hand side in place. Overflows to NA.
source§impl FromIterator<Rfloat> for Doubles
impl FromIterator<Rfloat> for Doubles
source§fn from_iter<T: IntoIterator<Item = Rfloat>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = Rfloat>>(iter: T) -> Self
A more generalised iterator collector for small vectors. Generates a non-ALTREP vector.
source§impl MulAssign<Rfloat> for &mut Rfloat
impl MulAssign<Rfloat> for &mut Rfloat
source§fn mul_assign(&mut self, other: Rfloat)
fn mul_assign(&mut self, other: Rfloat)
Multiply two Rfloat values or an option of f64, modifying the left-hand side in place. Overflows to NA.
source§impl MulAssign<Rfloat> for Option<f64>
impl MulAssign<Rfloat> for Option<f64>
source§fn mul_assign(&mut self, other: Rfloat)
fn mul_assign(&mut self, other: Rfloat)
Multiply two Rfloat values or an option of f64, modifying the left-hand side in place. Overflows to NA.
source§impl MulAssign<Rfloat> for Rfloat
impl MulAssign<Rfloat> for Rfloat
source§fn mul_assign(&mut self, other: Rfloat)
fn mul_assign(&mut self, other: Rfloat)
Multiply two Rfloat values or an option of f64, modifying the left-hand side in place. Overflows to NA.
source§impl MulAssign<f64> for &mut Rfloat
impl MulAssign<f64> for &mut Rfloat
source§fn mul_assign(&mut self, other: f64)
fn mul_assign(&mut self, other: f64)
Multiply two Rfloat values or an option of f64, modifying the left-hand side in place. Overflows to NA.
source§impl MulAssign<f64> for Rfloat
impl MulAssign<f64> for Rfloat
source§fn mul_assign(&mut self, other: f64)
fn mul_assign(&mut self, other: f64)
Multiply two Rfloat values or an option of f64, modifying the left-hand side in place. Overflows to NA.
source§impl PartialEq<Rfloat> for Rfloat
impl PartialEq<Rfloat> for Rfloat
use extendr_api::prelude::*;
test! {
assert!(<Rfloat>::default().eq(&<Rfloat>::default()));
assert!(!<Rfloat>::na().eq(&<Rfloat>::na()));
}
source§impl PartialEq<f64> for &Rfloat
impl PartialEq<f64> for &Rfloat
use extendr_api::prelude::*;
test! {
assert!(<Rfloat>::default().eq(&<f64>::default()));
}
source§impl PartialEq<f64> for Rfloat
impl PartialEq<f64> for Rfloat
use extendr_api::prelude::*;
test! {
assert!(<Rfloat>::default().eq(&<f64>::default()));
}
source§impl SubAssign<Rfloat> for &mut Rfloat
impl SubAssign<Rfloat> for &mut Rfloat
source§fn sub_assign(&mut self, other: Rfloat)
fn sub_assign(&mut self, other: Rfloat)
Subtract two Rfloat values or an option of f64, modifying the left-hand side in place. Overflows to NA.
source§impl SubAssign<Rfloat> for Option<f64>
impl SubAssign<Rfloat> for Option<f64>
source§fn sub_assign(&mut self, other: Rfloat)
fn sub_assign(&mut self, other: Rfloat)
Subtract two Rfloat values or an option of f64, modifying the left-hand side in place. Overflows to NA.
source§impl SubAssign<Rfloat> for Rfloat
impl SubAssign<Rfloat> for Rfloat
source§fn sub_assign(&mut self, other: Rfloat)
fn sub_assign(&mut self, other: Rfloat)
Subtract two Rfloat values or an option of f64, modifying the left-hand side in place. Overflows to NA.
source§impl SubAssign<f64> for &mut Rfloat
impl SubAssign<f64> for &mut Rfloat
source§fn sub_assign(&mut self, other: f64)
fn sub_assign(&mut self, other: f64)
Subtract two Rfloat values or an option of f64, modifying the left-hand side in place. Overflows to NA.
source§impl SubAssign<f64> for Rfloat
impl SubAssign<f64> for Rfloat
source§fn sub_assign(&mut self, other: f64)
fn sub_assign(&mut self, other: f64)
Subtract two Rfloat values or an option of f64, modifying the left-hand side in place. Overflows to NA.