[][src]Trait maths_traits::algebra::module_like::SesquilinearForm

pub trait SesquilinearForm<R: UnitalRing, M: RingModule<R>> {
    fn product_of(&self, v1: M, v2: M) -> R;

    fn sigma(&self, x: R) -> R { ... }
fn sigma_inv(&self, x: R) -> R { ... }
fn square(&self, x: M) -> R { ... }
fn is_null(&self, x: M) -> bool { ... }
fn orthogonal(&self, x: M, y: M) -> bool { ... }
fn orth_comp(&self, x: M, y: M) -> M
    where
        R: DivisionRing
, { ... }
fn par_comp(&self, x: M, y: M) -> M
    where
        R: DivisionRing
, { ... } }

A product between two vectors or module elements resulting in a scalar that is semi-linear in both arguments

Rigorously, a σ-sesquilinear form is a mapping •:M⨯M->R from a Ring Module to its base ring such that:

  • (x+y)•z = x•z + y•z
  • x•(y+z) = x•y + x•y
  • (c*x)•y = c*(x•y)
  • x•(c*y) = (x•y)*σ(c) where σ:R->R is some anti-automorphism, usually the complex conjugate or the identity map

Notes on Definition

It is additionally worth emphasizing that in general, while there are a number of other properties commonly added to this list, none of them should be assumed without the addition of the appropriate marker trait. In particular:

  • x•(c*y) may not equal (x•y)*c
  • x•y may not equal y•x
  • x•y = 0 does not necessarily imply y•x = 0

However, if these properties are desired, then the following additional traits can be implemented or used:

Examples

  • Dot product of finite dimensional spaces and modules: x•y = Σ(xₖ*yₖ)
  • Inner Product of real and complex vector spaces of any dimension
  • Complex and Hyper-complex moduli: z*̅w
  • The "Cross-Product" in 2D real-vector spaces: x₁*y₂ - x₂*y₁
    • Alternatively, the mapping taking two vectors to the determinant of the matrix with the vectors as its columns
  • Minkowski metric: ds² = dx² + dy² + dz² - dt²
  • Scalar product of the conformal model of Geometric algebra

Required methods

fn product_of(&self, v1: M, v2: M) -> R

The function that applies the sesquilinear form

Specifically, a mapping •:M⨯M->R such that

  • (x + y)•z = x•z + y•z
  • x•(y + z) = x•y + x•y
  • (c*x)•y = c*(x•y)
  • x•(c*y) = (x•y)*σ(c) where σ is some anti-automorphism of R
Loading content...

Provided methods

fn sigma(&self, x: R) -> R

The mapping on R that factors the second argument of the sesquilinear form

Specifically: a function σ:R->R such that:

  • x•(c*y) = (x•y)*σ(c)
  • σ is an anti-automorphism:
    • σ(a + b) = σ(a) + σ(b)
    • σ(a*b) = σ(b)*σ(a)
    • σ(a)!=σ(b) whenever a!=b
    • for all a in R, there is a b in R where σ(b) = a

By default, this is just the identity operation, but common alternatives include negation and the complex conjugate

fn sigma_inv(&self, x: R) -> R

The inverse of the σ

fn square(&self, x: M) -> R

An alias for x•x

fn is_null(&self, x: M) -> bool

Returns true if x•x = 0

fn orthogonal(&self, x: M, y: M) -> bool

Returns true if x•y = 0

Note that this may not imply that y is orthogonal to x, unless the product is also a ReflexiveForm

fn orth_comp(&self, x: M, y: M) -> M where
    R: DivisionRing, 

The orthogonal component of y with respect to x, assuming x is not null

Specifically, this a vector or element v such that:

  • v•x = 0
  • y-v = c*x for some c in R

Most of the time, this can be computed simply by subtracting the parallel component from y

Do note however, that if x is a null-element (ie. x•x = 0), then such a vector does not exist and this function may panic!

fn par_comp(&self, x: M, y: M) -> M where
    R: DivisionRing, 

The parallel component of y with respect to x, assuming x is not null

Specifically, this a vector or element w such that:

  • w = c*x for some c in R
  • (y-w)•x = 0

This can usually be computed simply with the formula w = x*(y•x)*((x•x)⁻¹)

Do note however, that if x is a null-element (ie. x•x = 0), then such a vector does not exist and this function may panic!

Loading content...

Implementors

impl<K: ComplexRing, V: InnerProductSpace<K>> SesquilinearForm<K, V> for InnerProductMetric[src]

Loading content...