pub trait ComplexAnalysis {
// Required methods
fn is_analytic_at(&self, variable: &Symbol, point: &Expression) -> bool;
fn pole_order(&self, variable: &Symbol, pole: &Expression) -> u32;
fn is_removable_singularity(
&self,
variable: &Symbol,
point: &Expression,
) -> bool;
fn is_essential_singularity(
&self,
variable: &Symbol,
point: &Expression,
) -> bool;
}Expand description
Trait for complex analysis operations related to singularities
Required Methods§
Sourcefn is_analytic_at(&self, variable: &Symbol, point: &Expression) -> bool
fn is_analytic_at(&self, variable: &Symbol, point: &Expression) -> bool
Check if function is analytic at a point
§Examples
use mathhook_core::{Expression, symbol};
use mathhook_core::calculus::ComplexAnalysis;
let z = symbol!(z);
let expr = Expression::pow(Expression::symbol(z.clone()), Expression::integer(2));
let point = Expression::integer(1);
let is_analytic = expr.is_analytic_at(&z, &point);Sourcefn pole_order(&self, variable: &Symbol, pole: &Expression) -> u32
fn pole_order(&self, variable: &Symbol, pole: &Expression) -> u32
Determine the order of a pole
§Examples
use mathhook_core::{Expression, symbol};
use mathhook_core::calculus::ComplexAnalysis;
let z = symbol!(z);
let expr = Expression::pow(
Expression::pow(
Expression::add(vec![Expression::symbol(z.clone()), Expression::integer(-1)]),
Expression::integer(2)
),
Expression::integer(-1)
);
let pole = Expression::integer(1);
let order = expr.pole_order(&z, &pole);Sourcefn is_removable_singularity(
&self,
variable: &Symbol,
point: &Expression,
) -> bool
fn is_removable_singularity( &self, variable: &Symbol, point: &Expression, ) -> bool
Check if point is a removable singularity
§Examples
use mathhook_core::{Expression, symbol};
use mathhook_core::calculus::ComplexAnalysis;
let z = symbol!(z);
let expr = Expression::mul(vec![
Expression::function("sin", vec![Expression::symbol(z.clone())]),
Expression::pow(Expression::symbol(z.clone()), Expression::integer(-1))
]);
let point = Expression::integer(0);
let is_removable = expr.is_removable_singularity(&z, &point);Sourcefn is_essential_singularity(
&self,
variable: &Symbol,
point: &Expression,
) -> bool
fn is_essential_singularity( &self, variable: &Symbol, point: &Expression, ) -> bool
Check if point is an essential singularity
§Examples
use mathhook_core::{Expression, symbol};
use mathhook_core::calculus::ComplexAnalysis;
let z = symbol!(z);
let expr = Expression::function(
"exp",
vec![Expression::pow(Expression::symbol(z.clone()), Expression::integer(-1))]
);
let point = Expression::integer(0);
let is_essential = expr.is_essential_singularity(&z, &point);