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
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
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
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.