pub type C64 = Complex<f64>;Aliased Type§
struct C64 {
pub re: f64,
pub im: f64,
}Fields§
§re: f64Real portion of the complex number
im: f64Imaginary portion of the complex number
Trait Implementations§
Source§impl<'a> Add<&'a ComplexMatrix> for C64
Element-wise addition between C64 & &ComplexMatrix
impl<'a> Add<&'a ComplexMatrix> for C64
Element-wise addition between C64 & &ComplexMatrix
Source§type Output = ComplexMatrix
type Output = ComplexMatrix
The resulting type after applying the
+ operator.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);
}
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
type Output = ComplexMatrix
The resulting type after applying the
+ operator.Source§impl GKIntegrable for C64
impl GKIntegrable for C64
Source§impl GLKIntegrable for C64
impl GLKIntegrable for C64
Source§impl<'a> Mul<&'a ComplexMatrix> for C64
impl<'a> Mul<&'a ComplexMatrix> for C64
Source§type Output = ComplexMatrix
type Output = ComplexMatrix
The resulting type after applying the
* operator.Source§impl Mul<ComplexMatrix> for C64
impl Mul<ComplexMatrix> for C64
Source§type Output = ComplexMatrix
type Output = ComplexMatrix
The resulting type after applying the
* operator.Source§impl NCIntegrable for C64
impl NCIntegrable for C64
type NodeY = (Vec<f64>, Vec<f64>)
type NCPolynomial = (Polynomial, Polynomial)
Source§fn compute_node_y<F>(f: F, node_x: &[f64]) -> Self::NodeY
fn compute_node_y<F>(f: F, node_x: &[f64]) -> Self::NodeY
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
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
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
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
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
type Output = ComplexMatrix
The resulting type after applying the
- operator.