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