extendr_api::scalar

Type Alias c64

Source
pub type c64 = Complex<f64>;

Aliased Type§

struct c64 {
    pub re: f64,
    pub im: f64,
}

Fields§

§re: f64

Real portion of the complex number

§im: f64

Imaginary portion of the complex number

Trait Implementations§

Source§

impl Add<Rcplx> for c64

Source§

fn add(self, rhs: Rcplx) -> Self::Output

Add two Rcplx values or an option of c64.

Source§

type Output = Rcplx

The resulting type after applying the + operator.
Source§

impl CanBeNA for c64

Source§

fn is_na(&self) -> bool

Source§

fn na() -> c64

Source§

impl Div<Rcplx> for c64

Source§

fn div(self, rhs: Rcplx) -> Self::Output

Divide two Rcplx values or an option of c64.

Source§

type Output = Rcplx

The resulting type after applying the / operator.
Source§

impl Mul<Rcplx> for c64

Source§

fn mul(self, rhs: Rcplx) -> Self::Output

Multiply two Rcplx values or an option of c64.

Source§

type Output = Rcplx

The resulting type after applying the * operator.
Source§

impl PartialEq<Rcplx> for c64

use extendr_api::prelude::*;
test! {
    assert!(<c64>::default().eq(&<Rcplx>::default()));
}
Source§

fn eq(&self, other: &Rcplx) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Sub<Rcplx> for c64

Source§

fn sub(self, rhs: Rcplx) -> Self::Output

Subtract two Rcplx values or an option of c64.

Source§

type Output = Rcplx

The resulting type after applying the - operator.
Source§

impl ToVectorValue for &c64

Source§

fn sexptype() -> SEXPTYPE

Source§

fn to_complex(&self) -> Rcomplex

Source§

fn to_real(&self) -> f64
where Self: Sized,

Source§

fn to_integer(&self) -> i32
where Self: Sized,

Source§

fn to_logical(&self) -> i32
where Self: Sized,

Source§

fn to_raw(&self) -> u8
where Self: Sized,

Source§

fn to_sexp(&self) -> SEXP
where Self: Sized,

Source§

impl ToVectorValue for c64

Source§

fn sexptype() -> SEXPTYPE

Source§

fn to_complex(&self) -> Rcomplex

Source§

fn to_real(&self) -> f64
where Self: Sized,

Source§

fn to_integer(&self) -> i32
where Self: Sized,

Source§

fn to_logical(&self) -> i32
where Self: Sized,

Source§

fn to_raw(&self) -> u8
where Self: Sized,

Source§

fn to_sexp(&self) -> SEXP
where Self: Sized,