Type Alias peroxide::complex::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<'a> Add<&'a ComplexMatrix> for C64

Element-wise addition between C64 & &ComplexMatrix

source§

type Output = ComplexMatrix

The resulting type after applying the + operator.
source§

fn add(self, other: &'a ComplexMatrix) -> Self::Output

Performs the + operation. Read more
source§

impl Add<ComplexMatrix> for C64

§Examples

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;
use peroxide::complex::matrix::*;

fn main() {
    let mut a = ml_cmatrix("1.0+1.0i 2.0+2.0i;
                                   4.0+4.0i 5.0+5.0i");
    let a_exp = ml_cmatrix("2.0+2.0i 3.0+3.0i;
                                   5.0+5.0i 6.0+6.0i");
    assert_eq!(C64::new(1_f64, 1_f64) + a, a_exp);
}
source§

type Output = ComplexMatrix

The resulting type after applying the + operator.
source§

fn add(self, other: ComplexMatrix) -> Self::Output

Performs the + operation. Read more
source§

impl GKIntegrable for C64

source§

fn is_finite(&self) -> bool

Returns true if this object is neither infinite nor NaN.
source§

fn gk_norm(&self) -> f64

Returns the value of the norm used by Gauss Kronrod Quadrature to compute relative tolerances.
source§

fn is_within_tol(&self, tol: f64) -> bool

Returns true if this object is less than the tolerance passed as the tol argument. By default, returns true if its gk_norm is less than tol.
source§

impl GLKIntegrable for C64

source§

const ZERO: Self = C64::ZERO

The neutral element of addition.
source§

impl<'a> Mul<&'a ComplexMatrix> for C64

source§

type Output = ComplexMatrix

The resulting type after applying the * operator.
source§

fn mul(self, other: &'a ComplexMatrix) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<ComplexMatrix> for C64

source§

type Output = ComplexMatrix

The resulting type after applying the * operator.
source§

fn mul(self, other: ComplexMatrix) -> Self::Output

Performs the * operation. Read more
source§

impl NCIntegrable for C64

source§

type NodeY = (Vec<f64>, Vec<f64>)

source§

type NCPolynomial = (Polynomial, Polynomial)

source§

fn compute_node_y<F>(f: F, node_x: &[f64]) -> Self::NodeY
where F: Fn(f64) -> Self,

Returns the image of node_x under function f, in a representation (Self::NodeY) suitable for separately computing one Lagrange polynomial for each of the degrees of freedom of Self (e.g. a Vec with as many entries as the number of degrees of freedom).
source§

fn compute_polynomial( node_x: &[f64], node_y: &Self::NodeY, ) -> Self::NCPolynomial

Computes one Lagrange polynomial for each one of the degrees of freedom of Self, returning them in a representation (Self::NCPolynomial) suitable to separately performing operation on them (e.g. Vec<Polynomial>).
source§

fn integrate_polynomial(p: &Self::NCPolynomial) -> Self::NCPolynomial

Separately integrates each of the polynomials obtained using compute_polynomial.
source§

fn evaluate_polynomial(p: &Self::NCPolynomial, x: f64) -> Self

Separately evaluates each of the polynomial integrated using integrate_polynomial at x, then recombines the result into a Self.
source§

impl Sub<ComplexMatrix> for C64

Subtraction Complex Matrix with C64

§Examples

#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;
use peroxide::complex::matrix::*;

fn main() {
    let mut a = ml_cmatrix("1.0+1.0i 2.0+2.0i;
                                   4.0+4.0i 5.0+5.0i");
    let a_exp = ml_cmatrix("0.0+0.0i 1.0+1.0i;
                                   3.0+3.0i 4.0+4.0i");
    assert_eq!(a - C64::new(1_f64, 1_f64), a_exp);
}
source§

type Output = ComplexMatrix

The resulting type after applying the - operator.
source§

fn sub(self, other: ComplexMatrix) -> Self::Output

Performs the - operation. Read more