Multivector

Struct Multivector 

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

A multivector in a Clifford algebra Cl(P,Q,R)

§Type Parameters

  • P: Number of basis vectors that square to +1
  • Q: Number of basis vectors that square to -1
  • R: Number of basis vectors that square to 0

Implementations§

Source§

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

Source

pub const DIM: usize

Total dimension of the algebra’s vector space

Source

pub const BASIS_COUNT: usize

Total number of basis blades (2^DIM)

Source

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

Create a new zero multivector

Source

pub fn scalar(value: f64) -> Multivector<P, Q, R>

Create a scalar multivector

Source

pub fn from_vector(vector: &Vector<P, Q, R>) -> Multivector<P, Q, R>

Create multivector from vector

Source

pub fn from_bivector(bivector: &Bivector<P, Q, R>) -> Multivector<P, Q, R>

Create multivector from bivector

Source

pub fn basis_vector(i: usize) -> Multivector<P, Q, R>

Create a basis vector e_i (i starts from 0)

Source

pub fn from_coefficients(coefficients: Vec<f64>) -> Multivector<P, Q, R>

Create a multivector from coefficients

Source

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

Create a multivector from a slice (convenience for tests)

Source

pub fn get(&self, index: usize) -> f64

Get coefficient for a specific basis blade (by index)

Source

pub fn set(&mut self, index: usize, value: f64)

Set coefficient for a specific basis blade

Source

pub fn scalar_part(&self) -> f64

Get the scalar part (grade 0)

Source

pub fn set_scalar(&mut self, value: f64)

Set the scalar part

Source

pub fn vector_part(&self) -> Vector<P, Q, R>

Get vector part as a Vector type

Source

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

Get bivector part as a Multivector (grade 2 projection)

Source

pub fn bivector_type(&self) -> Bivector<P, Q, R>

Get bivector part as a Bivector type wrapper

Source

pub fn trivector_part(&self) -> f64

Get trivector part (scalar for 3D)

Source

pub fn set_vector_component(&mut self, index: usize, value: f64)

Set vector component

Source

pub fn set_bivector_component(&mut self, index: usize, value: f64)

Set bivector component

Source

pub fn vector_component(&self, index: usize) -> f64

Get vector component

Source

pub fn as_slice(&self) -> &[f64]

Get coefficients as slice for comparison

Source

pub fn to_vec(&self) -> Vec<f64>

Convert coefficients to owned vector

Useful for interoperability with other libraries and serialization.

Source

pub fn grade_project(&self, grade: usize) -> Multivector<P, Q, R>

Grade projection with alternative name for clarity

Alias for grade_projection that emphasizes the projection operation.

Source

pub fn wedge(&self, other: &Multivector<P, Q, R>) -> Multivector<P, Q, R>

Wedge product (alias for outer product)

The wedge product ∧ is the antisymmetric outer product, fundamental to exterior algebra and differential forms.

Source

pub fn dot(&self, other: &Multivector<P, Q, R>) -> Multivector<P, Q, R>

Dot product (alias for inner product)

The dot product · is the grade-lowering inner product, generalizing the vector dot product to all grades.

Source

pub fn add(&self, other: &Multivector<P, Q, R>) -> Multivector<P, Q, R>

Add method for convenience

Source

pub fn grade(&self) -> usize

Get the grade of a multivector (returns the highest non-zero grade)

Source

pub fn outer_product_with_vector( &self, other: &Vector<P, Q, R>, ) -> Multivector<P, Q, R>

Outer product with a vector (convenience method)

Source

pub fn geometric_product( &self, rhs: &Multivector<P, Q, R>, ) -> Multivector<P, Q, R>

Geometric product with another multivector

The geometric product is the fundamental operation in geometric algebra, combining both the inner and outer products.

Source

pub fn geometric_product_scalar( &self, rhs: &Multivector<P, Q, R>, ) -> Multivector<P, Q, R>

Scalar implementation of geometric product (fallback)

Source

pub fn inner_product(&self, rhs: &Multivector<P, Q, R>) -> Multivector<P, Q, R>

Inner product (grade-lowering, dot product for vectors)

Source

pub fn outer_product(&self, rhs: &Multivector<P, Q, R>) -> Multivector<P, Q, R>

Outer product (wedge product, grade-raising)

Source

pub fn scalar_product(&self, rhs: &Multivector<P, Q, R>) -> f64

Scalar product (grade-0 part of geometric product)

Source

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

Reverse operation (reverses order of basis vectors in each blade)

Source

pub fn grade_projection(&self, grade: usize) -> Multivector<P, Q, R>

Grade projection - extract components of a specific grade

Source

pub fn grade_magnitude(&self, grade: usize) -> f64

Compute the magnitude of a specific grade component.

This extracts the k-vector part and computes its magnitude. Useful for determining grade dominance in holographic representations.

§Arguments
  • grade - The grade to compute magnitude for (0=scalar, 1=vector, 2=bivector, etc.)
§Returns

The magnitude of the grade-k component, or 0.0 if no such component exists.

§Example
use amari_core::Multivector;
let mv = Multivector::<3,0,0>::basis_vector(0) + Multivector::<3,0,0>::scalar(2.0);
assert!((mv.grade_magnitude(0) - 2.0).abs() < 1e-10);  // scalar part
assert!((mv.grade_magnitude(1) - 1.0).abs() < 1e-10);  // vector part
Source

pub fn grade_spectrum(&self) -> Vec<f64>

Get all grade magnitudes as a vector.

Returns the magnitude of each grade component from 0 to DIM. This provides a “grade spectrum” view of the multivector.

Source

pub fn is_zero(&self) -> bool

Check if this is (approximately) zero

Source

pub fn norm_squared(&self) -> f64

Compute the norm squared (scalar product with reverse)

Source

pub fn magnitude(&self) -> f64

Compute the magnitude (length) of this multivector

The magnitude is defined as |a| = √(a·ã) where ã is the reverse of a. This provides the natural norm inherited from the underlying vector space.

§Mathematical Properties
  • Always non-negative: |a| ≥ 0
  • Zero iff a = 0: |a| = 0 ⟺ a = 0
  • Sub-multiplicative: |ab| ≤ |a||b|
§Examples
use amari_core::Multivector;
let v = Multivector::<3,0,0>::basis_vector(0);
assert_eq!(v.magnitude(), 1.0);
Source

pub fn norm(&self) -> f64

Compute the norm (magnitude) of this multivector

Note: This method is maintained for backward compatibility. New code should prefer magnitude() for clarity.

Source

pub fn abs(&self) -> f64

Absolute value (same as magnitude/norm for multivectors)

Source

pub fn approx_eq(&self, other: &Multivector<P, Q, R>, epsilon: f64) -> bool

Approximate equality comparison

Source

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

Normalize this multivector

Source

pub fn inverse(&self) -> Option<Multivector<P, Q, R>>

Compute multiplicative inverse if it exists

Source

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

Exponential map for bivectors (creates rotors)

For a bivector B, exp(B) creates a rotor that performs rotation in the plane defined by B.

Source

pub fn left_contraction( &self, other: &Multivector<P, Q, R>, ) -> Multivector<P, Q, R>

Left contraction: a ⌟ b

Generalized inner product where the grade of the result is |grade(b) - grade(a)|. The left operand’s grade is reduced.

Source

pub fn right_contraction( &self, other: &Multivector<P, Q, R>, ) -> Multivector<P, Q, R>

Right contraction: a ⌞ b

Generalized inner product where the grade of the result is |grade(a) - grade(b)|. The right operand’s grade is reduced.

Source

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

Hodge dual: ⋆a

Maps k-vectors to (n-k)-vectors in n-dimensional space. Essential for electromagnetic field theory and differential forms. In 3D: scalar -> pseudoscalar, vector -> bivector, bivector -> vector, pseudoscalar -> scalar

Trait Implementations§

Source§

impl<const P: usize, const Q: usize, const R: usize> Add for &Multivector<P, Q, R>

Source§

type Output = Multivector<P, Q, R>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

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

Source§

type Output = Multivector<P, Q, R>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Multivector<P, Q, R>) -> Multivector<P, Q, R>

Performs the + operation. Read more
Source§

impl<const P: usize, const Q: usize, const R: usize> AdjointableOperator<Multivector<P, Q, R>> for MatrixOperator<P, Q, R>

Source§

type Adjoint = MatrixOperator<P, Q, R>

The type of the adjoint operator.
Source§

fn adjoint(&self) -> Self::Adjoint

Compute the adjoint operator.
Source§

fn is_self_adjoint(&self) -> bool

Check if this operator is self-adjoint (T = T*).
Source§

fn is_normal(&self) -> bool

Check if this operator is normal (TT* = T*T).
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> BoundedOperator<Multivector<P, Q, R>> for CompactMatrixOperator<P, Q, R>

Source§

fn operator_norm(&self) -> f64

Compute or estimate the operator norm ||T||.
Source§

fn is_bounded_by(&self, bound: f64) -> bool

Check if the operator is bounded by a given constant.
Source§

impl<const P: usize, const Q: usize, const R: usize> BoundedOperator<Multivector<P, Q, R>> for FiniteRankOperator<P, Q, R>

Source§

fn operator_norm(&self) -> f64

Compute or estimate the operator norm ||T||.
Source§

fn is_bounded_by(&self, bound: f64) -> bool

Check if the operator is bounded by a given constant.
Source§

impl<const P: usize, const Q: usize, const R: usize> BoundedOperator<Multivector<P, Q, R>> for FredholmMatrixOperator<P, Q, R>

Source§

fn operator_norm(&self) -> f64

Compute or estimate the operator norm ||T||.
Source§

fn is_bounded_by(&self, bound: f64) -> bool

Check if the operator is bounded by a given constant.
Source§

impl<const P: usize, const Q: usize, const R: usize> BoundedOperator<Multivector<P, Q, R>> for IdentityOperator<Multivector<P, Q, R>>

Source§

fn operator_norm(&self) -> f64

Compute or estimate the operator norm ||T||.
Source§

fn is_bounded_by(&self, bound: f64) -> bool

Check if the operator is bounded by a given constant.
Source§

impl<const P: usize, const Q: usize, const R: usize> BoundedOperator<Multivector<P, Q, R>> for MatrixOperator<P, Q, R>

Source§

fn operator_norm(&self) -> f64

Compute or estimate the operator norm ||T||.
Source§

fn is_bounded_by(&self, bound: f64) -> bool

Check if the operator is bounded by a given constant.
Source§

impl<const P: usize, const Q: usize, const R: usize> BoundedOperator<Multivector<P, Q, R>> for ProjectionOperator<P, Q, R>

Source§

fn operator_norm(&self) -> f64

Compute or estimate the operator norm ||T||.
Source§

fn is_bounded_by(&self, bound: f64) -> bool

Check if the operator is bounded by a given constant.
Source§

impl<const P: usize, const Q: usize, const R: usize> BoundedOperator<Multivector<P, Q, R>> for ScalingOperator<Multivector<P, Q, R>>

Source§

fn operator_norm(&self) -> f64

Compute or estimate the operator norm ||T||.
Source§

fn is_bounded_by(&self, bound: f64) -> bool

Check if the operator is bounded by a given constant.
Source§

impl<const P: usize, const Q: usize, const R: usize> BoundedOperator<Multivector<P, Q, R>> for ZeroOperator<Multivector<P, Q, R>>

Source§

fn operator_norm(&self) -> f64

Compute or estimate the operator norm ||T||.
Source§

fn is_bounded_by(&self, bound: f64) -> bool

Check if the operator is bounded by a given constant.
Source§

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

Source§

fn clone(&self) -> Multivector<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> CompactOperator<Multivector<P, Q, R>> for CompactMatrixOperator<P, Q, R>

Source§

fn is_finite_rank(&self) -> bool

Check if the operator has finite rank.
Source§

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

Get the rank (dimension of range) if finite.
Source§

fn singular_values(&self) -> Result<Vec<f64>>

Get the singular values (if computable). Read more
Source§

impl<const P: usize, const Q: usize, const R: usize> CompactOperator<Multivector<P, Q, R>> for FiniteRankOperator<P, Q, R>

Source§

fn is_finite_rank(&self) -> bool

Check if the operator has finite rank.
Source§

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

Get the rank (dimension of range) if finite.
Source§

fn singular_values(&self) -> Result<Vec<f64>>

Get the singular values (if computable). Read more
Source§

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

Source§

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

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

impl<const P: usize, const Q: usize, const R: usize> FredholmOperator<Multivector<P, Q, R>> for FiniteRankOperator<P, Q, R>

Source§

fn kernel_dimension(&self) -> usize

Compute the dimension of the kernel.
Source§

fn cokernel_dimension(&self) -> usize

Compute the dimension of the cokernel.
Source§

fn index(&self) -> i64

Compute the Fredholm index: dim(ker T) - dim(coker T).
Source§

fn is_isomorphism(&self) -> bool

Check if the operator is an isomorphism (index 0, trivial kernel).
Source§

impl<const P: usize, const Q: usize, const R: usize> FredholmOperator<Multivector<P, Q, R>> for FredholmMatrixOperator<P, Q, R>

Source§

fn kernel_dimension(&self) -> usize

Compute the dimension of the kernel.
Source§

fn cokernel_dimension(&self) -> usize

Compute the dimension of the cokernel.
Source§

fn index(&self) -> i64

Compute the Fredholm index: dim(ker T) - dim(coker T).
Source§

fn is_isomorphism(&self) -> bool

Check if the operator is an isomorphism (index 0, trivial kernel).
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> LinearOperator<Multivector<P, Q, R>> for CompactMatrixOperator<P, Q, R>

Source§

fn apply(&self, x: &Multivector<P, Q, R>) -> Result<Multivector<P, Q, R>>

Apply the operator to an element.
Source§

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

Get the domain dimension (None if infinite).
Source§

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

Get the codomain dimension (None if infinite).
Source§

impl<const P: usize, const Q: usize, const R: usize> LinearOperator<Multivector<P, Q, R>> for FiniteRankOperator<P, Q, R>

Source§

fn apply(&self, x: &Multivector<P, Q, R>) -> Result<Multivector<P, Q, R>>

Apply the operator to an element.
Source§

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

Get the domain dimension (None if infinite).
Source§

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

Get the codomain dimension (None if infinite).
Source§

impl<const P: usize, const Q: usize, const R: usize> LinearOperator<Multivector<P, Q, R>> for FredholmMatrixOperator<P, Q, R>

Source§

fn apply(&self, x: &Multivector<P, Q, R>) -> Result<Multivector<P, Q, R>>

Apply the operator to an element.
Source§

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

Get the domain dimension (None if infinite).
Source§

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

Get the codomain dimension (None if infinite).
Source§

impl<const P: usize, const Q: usize, const R: usize> LinearOperator<Multivector<P, Q, R>> for IdentityOperator<Multivector<P, Q, R>>

Source§

fn apply(&self, x: &Multivector<P, Q, R>) -> Result<Multivector<P, Q, R>>

Apply the operator to an element.
Source§

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

Get the domain dimension (None if infinite).
Source§

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

Get the codomain dimension (None if infinite).
Source§

impl<const P: usize, const Q: usize, const R: usize> LinearOperator<Multivector<P, Q, R>> for MatrixOperator<P, Q, R>

Source§

fn apply(&self, x: &Multivector<P, Q, R>) -> Result<Multivector<P, Q, R>>

Apply the operator to an element.
Source§

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

Get the domain dimension (None if infinite).
Source§

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

Get the codomain dimension (None if infinite).
Source§

impl<const P: usize, const Q: usize, const R: usize> LinearOperator<Multivector<P, Q, R>> for ProjectionOperator<P, Q, R>

Source§

fn apply(&self, x: &Multivector<P, Q, R>) -> Result<Multivector<P, Q, R>>

Apply the operator to an element.
Source§

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

Get the domain dimension (None if infinite).
Source§

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

Get the codomain dimension (None if infinite).
Source§

impl<const P: usize, const Q: usize, const R: usize> LinearOperator<Multivector<P, Q, R>> for ScalingOperator<Multivector<P, Q, R>>

Source§

fn apply(&self, x: &Multivector<P, Q, R>) -> Result<Multivector<P, Q, R>>

Apply the operator to an element.
Source§

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

Get the domain dimension (None if infinite).
Source§

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

Get the codomain dimension (None if infinite).
Source§

impl<const P: usize, const Q: usize, const R: usize> LinearOperator<Multivector<P, Q, R>> for ZeroOperator<Multivector<P, Q, R>>

Source§

fn apply(&self, _x: &Multivector<P, Q, R>) -> Result<Multivector<P, Q, R>>

Apply the operator to an element.
Source§

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

Get the domain dimension (None if infinite).
Source§

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

Get the codomain dimension (None if infinite).
Source§

impl<const P: usize, const Q: usize, const R: usize> Mul<f64> for &Multivector<P, Q, R>

Source§

type Output = Multivector<P, Q, R>

The resulting type after applying the * operator.
Source§

fn mul(self, scalar: f64) -> Multivector<P, Q, R>

Performs the * operation. Read more
Source§

impl<const P: usize, const Q: usize, const R: usize> Mul<f64> for Multivector<P, Q, R>

Source§

type Output = Multivector<P, Q, R>

The resulting type after applying the * operator.
Source§

fn mul(self, scalar: f64) -> Multivector<P, Q, R>

Performs the * operation. Read more
Source§

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

Source§

type Output = Multivector<P, Q, R>

The resulting type after applying the - operator.
Source§

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

Performs the unary - operation. Read more
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> PartialEq for Multivector<P, Q, R>

Source§

fn eq(&self, other: &Multivector<P, Q, R>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<const P: usize, const Q: usize, const R: usize> Sub for &Multivector<P, Q, R>

Source§

type Output = Multivector<P, Q, R>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

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

Source§

type Output = Multivector<P, Q, R>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Multivector<P, Q, R>) -> Multivector<P, Q, R>

Performs the - operation. Read more
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).
Source§

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

Source§

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

Returns the additive identity element of Self, 0. Read more
Source§

fn is_zero(&self) -> bool

Returns true if self is equal to the additive identity.
Source§

fn set_zero(&mut self)

Sets self to the additive identity element of Self, 0.
Source§

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

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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

§

impl<const P: usize, const Q: usize, const R: usize> UnwindSafe for Multivector<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