MultivectorHilbertSpace

Struct MultivectorHilbertSpace 

Source
pub struct MultivectorHilbertSpace<const P: usize, const Q: usize, const R: usize> { /* private fields */ }
Expand description

A Hilbert space of multivector elements.

This represents the finite-dimensional Hilbert space Cl(P,Q,R) with the standard inner product inherited from the coefficient representation.

§Type Parameters

  • P - Number of positive signature basis vectors
  • Q - Number of negative signature basis vectors
  • R - Number of zero signature basis vectors

§Mathematical Background

The Clifford algebra Cl(P,Q,R) is a 2^(P+Q+R)-dimensional real vector space. We equip it with the standard L² inner product on the coefficients:

⟨x, y⟩ = Σᵢ xᵢ yᵢ

This makes Cl(P,Q,R) into a finite-dimensional Hilbert space.

Implementations§

Source§

impl<const P: usize, const Q: usize, const R: usize> MultivectorHilbertSpace<P, Q, R>

Source

pub const DIM: usize

The dimension of the Clifford algebra.

Source

pub fn new() -> Self

Create a new multivector Hilbert space.

Source

pub fn signature(&self) -> (usize, usize, usize)

Get the signature (P, Q, R) of the algebra.

Source

pub fn algebra_dimension(&self) -> usize

Get the dimension of the algebra.

Source

pub fn from_coefficients( &self, coefficients: &[f64], ) -> Result<Multivector<P, Q, R>>

Create a multivector from coefficients.

Source

pub fn to_coefficients(&self, mv: &Multivector<P, Q, R>) -> Vec<f64>

Get the coefficients of a multivector.

Source

pub fn basis_vector(&self, index: usize) -> Result<Multivector<P, Q, R>>

Create a basis vector (unit multivector in direction i).

Source

pub fn basis(&self) -> Vec<Multivector<P, Q, R>>

Get all basis vectors.

Trait Implementations§

Source§

impl<const P: usize, const Q: usize, const R: usize> BanachSpace<Multivector<P, Q, R>> for MultivectorHilbertSpace<P, Q, R>

Source§

fn is_cauchy_sequence( &self, sequence: &[Multivector<P, Q, R>], tolerance: f64, ) -> bool

Check if a sequence appears to be Cauchy. Read more
Source§

fn sequence_limit( &self, sequence: &[Multivector<P, Q, R>], tolerance: f64, ) -> Result<Multivector<P, Q, R>>

Compute the limit of a Cauchy sequence if it exists.
Source§

impl<const P: usize, const Q: usize, const R: usize> Clone for MultivectorHilbertSpace<P, Q, R>

Source§

fn clone(&self) -> MultivectorHilbertSpace<P, Q, R>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<const P: usize, const Q: usize, const R: usize> Debug for MultivectorHilbertSpace<P, Q, R>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<const P: usize, const Q: usize, const R: usize> Default for MultivectorHilbertSpace<P, Q, R>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<const P: usize, const Q: usize, const R: usize> HilbertSpace<Multivector<P, Q, R>> for MultivectorHilbertSpace<P, Q, R>

Source§

fn riesz_representative<F>(&self, functional: F) -> Result<Multivector<P, Q, R>>
where F: Fn(&Multivector<P, Q, R>) -> f64,

Apply the Riesz representation theorem. Read more
Source§

fn orthogonal_complement_projection(&self, x: &V, subspace_basis: &[V]) -> V
where S: Into<f64> + From<f64>, V: Clone,

Compute the orthogonal complement projection. Read more
Source§

fn best_approximation(&self, x: &V, subspace_basis: &[V]) -> V
where S: Into<f64> + From<f64>, V: Clone,

Compute the best approximation to x from a subspace. Read more
Source§

fn is_orthonormal(&self, vectors: &[V], tolerance: f64) -> bool
where S: Into<f64>,

Check if a set of vectors forms an orthonormal system.
Source§

impl<const P: usize, const Q: usize, const R: usize> InnerProductSpace<Multivector<P, Q, R>> for MultivectorHilbertSpace<P, Q, R>

Source§

fn inner_product( &self, x: &Multivector<P, Q, R>, y: &Multivector<P, Q, R>, ) -> f64

Compute the inner product of two vectors.
Source§

fn project( &self, x: &Multivector<P, Q, R>, y: &Multivector<P, Q, R>, ) -> Multivector<P, Q, R>

Project x onto y. Read more
Source§

fn gram_schmidt( &self, vectors: &[Multivector<P, Q, R>], ) -> Vec<Multivector<P, Q, R>>

Gram-Schmidt orthogonalization of a set of vectors.
Source§

fn are_orthogonal(&self, x: &V, y: &V, tolerance: f64) -> bool
where S: Into<f64>,

Check if two vectors are orthogonal.
Source§

impl<const P: usize, const Q: usize, const R: usize> NormedSpace<Multivector<P, Q, R>> for MultivectorHilbertSpace<P, Q, R>

Source§

fn norm(&self, x: &Multivector<P, Q, R>) -> f64

Compute the norm of a vector.
Source§

fn normalize(&self, x: &Multivector<P, Q, R>) -> Option<Multivector<P, Q, R>>

Normalize a vector to unit length. Read more
Source§

fn distance(&self, x: &V, y: &V) -> f64

Compute the distance between two vectors.
Source§

impl<const P: usize, const Q: usize, const R: usize> VectorSpace<Multivector<P, Q, R>> for MultivectorHilbertSpace<P, Q, R>

Source§

fn add( &self, x: &Multivector<P, Q, R>, y: &Multivector<P, Q, R>, ) -> Multivector<P, Q, R>

Add two vectors.
Source§

fn sub( &self, x: &Multivector<P, Q, R>, y: &Multivector<P, Q, R>, ) -> Multivector<P, Q, R>

Subtract two vectors.
Source§

fn scale(&self, scalar: f64, x: &Multivector<P, Q, R>) -> Multivector<P, Q, R>

Multiply a vector by a scalar.
Source§

fn zero(&self) -> Multivector<P, Q, R>

Return the zero vector.
Source§

fn dimension(&self) -> Option<usize>

Return the dimension of the space (may be infinite).

Auto Trait Implementations§

§

impl<const P: usize, const Q: usize, const R: usize> Freeze for MultivectorHilbertSpace<P, Q, R>

§

impl<const P: usize, const Q: usize, const R: usize> RefUnwindSafe for MultivectorHilbertSpace<P, Q, R>

§

impl<const P: usize, const Q: usize, const R: usize> Send for MultivectorHilbertSpace<P, Q, R>

§

impl<const P: usize, const Q: usize, const R: usize> Sync for MultivectorHilbertSpace<P, Q, R>

§

impl<const P: usize, const Q: usize, const R: usize> Unpin for MultivectorHilbertSpace<P, Q, R>

§

impl<const P: usize, const Q: usize, const R: usize> UnwindSafe for MultivectorHilbertSpace<P, Q, R>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V