Skip to main content

Multivector

Struct Multivector 

Source
pub struct Multivector<T: Float, S: Signature> { /* private fields */ }
Expand description

A multivector in a Clifford algebra with signature S and scalar type T.

A multivector is a linear combination of basis blades. It is the most general element of a geometric algebra, capable of representing scalars, vectors, bivectors, and arbitrary combinations thereof.

§Type Parameters

  • T: The scalar type (e.g., f32, f64). Must implement Float.
  • S: The metric signature (e.g., Euclidean3). Defines how basis vectors square and thus the algebra’s geometry.

§Storage

Coefficients are stored in a dense array indexed by blade index. The blade index is a bitmask where bit i indicates the presence of basis vector eᵢ. See Blade for details.

§Example

use clifford::algebra::Multivector;
use clifford::signature::Euclidean2;

// Create basis vectors
let e1: Multivector<f64, Euclidean2> = Multivector::basis_vector(0);
let e2: Multivector<f64, Euclidean2> = Multivector::basis_vector(1);

// Geometric product: e₁e₂ = e₁₂ (a bivector)
let e12 = &e1 * &e2;

// e₁₂ squares to -1 in Euclidean space!
let e12_squared = &e12 * &e12;
assert!((e12_squared.scalar_part() - (-1.0)).abs() < 1e-10);

Implementations§

Source§

impl<T: Float, S: Signature> Multivector<T, S>

Source

pub fn zero() -> Self

Creates the zero multivector (additive identity).

All coefficients are zero. This is the identity element for addition: M + 0 = M for any multivector M.

§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

let zero: Multivector<f64, Euclidean3> = Multivector::zero();
assert!(zero.is_zero(1e-10));
Source

pub fn one() -> Self

Creates the unit scalar (multiplicative identity).

This is the scalar 1, which is the identity for the geometric product: M * 1 = 1 * M = M for any multivector M.

§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

let one: Multivector<f64, Euclidean3> = Multivector::one();
assert!((one.scalar_part() - 1.0).abs() < 1e-10);
Source

pub fn scalar(value: T) -> Self

Creates a scalar multivector (grade 0 only).

A scalar is a multivector with only the grade-0 component nonzero.

§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

let five: Multivector<f64, Euclidean3> = Multivector::scalar(5.0);
assert!((five.scalar_part() - 5.0).abs() < 1e-10);
Source

pub fn from_blade(blade: Blade) -> Self

Creates a multivector with a single basis blade.

The coefficient of the specified blade is set to 1, all others to 0.

§Arguments
  • blade - The basis blade to create
§Example
use clifford::algebra::Multivector;
use clifford::basis::Blade;
use clifford::signature::Euclidean3;

// Create the bivector e₁₂
let e12_blade = Blade::from_index(0b011);
let e12: Multivector<f64, Euclidean3> = Multivector::from_blade(e12_blade);

assert!((e12.get(e12_blade) - 1.0).abs() < 1e-10);
Source

pub fn basis_vector(i: usize) -> Self

Creates a basis vector multivector (grade 1).

Basis vector eᵢ is the fundamental directional unit along axis i.

§Arguments
  • i - Index of the basis vector (0-indexed)
§Panics

Panics if i >= S::DIM.

§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

let e1: Multivector<f64, Euclidean3> = Multivector::basis_vector(0);
let e2: Multivector<f64, Euclidean3> = Multivector::basis_vector(1);

// Vectors square to their metric value (1 for Euclidean)
let e1_sq = &e1 * &e1;
assert!((e1_sq.scalar_part() - 1.0).abs() < 1e-10);
Source

pub fn vector(components: &[T]) -> Self

Creates a vector multivector from components.

The components are the coefficients of the basis vectors e₁, e₂, etc.

§Arguments
  • components - Slice of coefficients for each basis vector
§Panics

Panics if components.len() > S::DIM.

§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

// Create vector v = 3e₁ + 4e₂ + 0e₃
let v: Multivector<f64, Euclidean3> = Multivector::vector(&[3.0, 4.0, 0.0]);

// |v|² = 3² + 4² = 25
let v_sq = &v * &v;
assert!((v_sq.scalar_part() - 25.0).abs() < 1e-10);
Source

pub fn from_coeffs(coeffs: &[T]) -> Self

Creates a multivector from a full array of coefficients.

§Arguments
  • coeffs - Coefficients for all basis blades (only first S::NumBlades::USIZE are used)
Source§

impl<T: Float, S: Signature> Multivector<T, S>

Source

pub fn get(&self, blade: Blade) -> T

Returns the coefficient of the given basis blade.

§Example
use clifford::algebra::Multivector;
use clifford::basis::Blade;
use clifford::signature::Euclidean3;

let v: Multivector<f64, Euclidean3> = Multivector::vector(&[3.0, 4.0, 5.0]);
assert!((v.get(Blade::basis_vector(0)) - 3.0).abs() < 1e-10);
assert!((v.get(Blade::basis_vector(1)) - 4.0).abs() < 1e-10);
Source

pub fn set(&mut self, blade: Blade, value: T)

Sets the coefficient of the given basis blade.

§Example
use clifford::algebra::Multivector;
use clifford::basis::Blade;
use clifford::signature::Euclidean3;

let mut mv: Multivector<f64, Euclidean3> = Multivector::zero();
mv.set(Blade::basis_vector(0), 5.0);
assert!((mv.get(Blade::basis_vector(0)) - 5.0).abs() < 1e-10);
Source

pub fn scalar_part(&self) -> T

Returns the scalar part (grade 0 coefficient).

This is the coefficient of the unit scalar blade.

§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

let mv: Multivector<f64, Euclidean3> = Multivector::scalar(42.0);
assert!((mv.scalar_part() - 42.0).abs() < 1e-10);
Source

pub fn is_zero(&self, epsilon: T) -> bool

Checks if this multivector is approximately zero.

Returns true if all coefficients have absolute value less than epsilon.

§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

let zero: Multivector<f64, Euclidean3> = Multivector::zero();
assert!(zero.is_zero(1e-10));

let v: Multivector<f64, Euclidean3> = Multivector::basis_vector(0);
assert!(!v.is_zero(1e-10));
Source§

impl<T: Float, S: Signature> Multivector<T, S>

Source

pub fn reverse(&self) -> Self

Returns the reverse of this multivector.

The reverse operation reverses the order of basis vectors in each blade. For a blade of grade k, the sign change is (-1)^(k(k-1)/2):

GradeSignExample
0+11̃ = 1
1+1ẽ₁ = e₁
2-1ẽ₁₂ = e₂₁ = -e₁₂
3-1ẽ₁₂₃ = e₃₂₁ = -e₁₂₃
4+1

The reverse is important for computing norms and inverses: |M|² = ⟨M M̃⟩₀ (scalar part of M times its reverse)

§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

let e1: Multivector<f64, Euclidean3> = Multivector::basis_vector(0);
let e2: Multivector<f64, Euclidean3> = Multivector::basis_vector(1);
let e12 = &e1 * &e2;

// Reverse of a bivector negates it
let e12_rev = e12.reverse();
assert!((&e12 + &e12_rev).is_zero(1e-10));
Source

pub fn involute(&self) -> Self

Returns the grade involution of this multivector.

Grade involution negates all odd-grade components. For a blade of grade k, the sign is (-1)^k:

GradeSign
0 (scalar)+1
1 (vector)-1
2 (bivector)+1
3 (trivector)-1

This operation is also called the “main involution” or “grade automorphism”.

§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

let v: Multivector<f64, Euclidean3> = Multivector::basis_vector(0);

// Involute of a vector negates it
let v_inv = v.involute();
assert!((&v + &v_inv).is_zero(1e-10));
Source

pub fn conjugate(&self) -> Self

Returns the Clifford conjugate of this multivector.

The Clifford conjugate is the composition of reverse and grade involution. For a blade of grade k, the sign is (-1)^(k(k+1)/2):

GradeSign
0+1
1-1
2-1
3+1
4+1
§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

let v: Multivector<f64, Euclidean3> = Multivector::basis_vector(0);
let v_conj = v.conjugate();

// Conjugate of a vector negates it
assert!((&v + &v_conj).is_zero(1e-10));
Source§

impl<T: Float, S: Signature> Multivector<T, S>

Source

pub fn norm_squared(&self) -> T

Returns the squared norm of this multivector.

The squared norm is the scalar part of M * M̃ (M times its reverse). For vectors in Euclidean space, this equals the sum of squared components.

Note: The squared norm can be negative in non-Euclidean signatures!

§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

let v: Multivector<f64, Euclidean3> = Multivector::vector(&[3.0, 4.0, 0.0]);
assert!((v.norm_squared() - 25.0).abs() < 1e-10); // 3² + 4² = 25
Source

pub fn norm(&self) -> T

Returns the norm of this multivector.

The norm is sqrt(|norm_squared|). We take the absolute value because the squared norm can be negative in non-Euclidean signatures.

§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

let v: Multivector<f64, Euclidean3> = Multivector::vector(&[3.0, 4.0, 0.0]);
assert!((v.norm() - 5.0).abs() < 1e-10); // sqrt(25) = 5
Source

pub fn normalize(&self) -> Option<Self>

Returns the normalized multivector (unit norm), or None if norm is zero.

§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

let v: Multivector<f64, Euclidean3> = Multivector::vector(&[3.0, 4.0, 0.0]);
let v_hat = v.normalize().unwrap();
assert!((v_hat.norm() - 1.0).abs() < 1e-10);
Source

pub fn inverse(&self) -> Option<Self>

Returns the multiplicative inverse, or None if not invertible.

For a multivector M with non-zero squared norm: M⁻¹ = M̃ / |M|²

This satisfies M * M⁻¹ = M⁻¹ * M = 1.

Note: Not all multivectors are invertible! The inverse exists only when the squared norm is non-zero.

§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

let v: Multivector<f64, Euclidean3> = Multivector::vector(&[1.0, 0.0, 0.0]);
let v_inv = v.inverse().unwrap();

// v * v⁻¹ = 1
let product = &v * &v_inv;
assert!((product.scalar_part() - 1.0).abs() < 1e-10);
assert!((&product - &Multivector::one()).is_zero(1e-10));
Source§

impl<T: Float, S: Signature> Multivector<T, S>

Source

pub fn grade_select(&self, k: usize) -> Self

Extracts the grade-k part of this multivector: ⟨M⟩ₖ.

Returns a multivector containing only the components of the specified grade, with all other grades set to zero.

§Arguments
  • k - The grade to extract (0 = scalar, 1 = vector, 2 = bivector, etc.)
§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

// Create a multivector with scalar and vector parts
let mut mv: Multivector<f64, Euclidean3> = Multivector::scalar(5.0);
mv = &mv + &Multivector::vector(&[1.0, 2.0, 3.0]);

// Extract just the scalar part
let scalar = mv.grade_select(0);
assert!((scalar.scalar_part() - 5.0).abs() < 1e-10);

// Extract just the vector part
let vector = mv.grade_select(1);
assert!(vector.grade_select(0).is_zero(1e-10));
Source

pub fn even(&self) -> Self

Extracts the even part of this multivector (grades 0, 2, 4, …).

The even subalgebra is closed under the geometric product and contains important elements like rotors (in 3D, the even subalgebra is isomorphic to quaternions).

§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;
use approx::relative_eq;

let e1: Multivector<f64, Euclidean3> = Multivector::basis_vector(0);
let e2: Multivector<f64, Euclidean3> = Multivector::basis_vector(1);

// A rotor is an even multivector: scalar + bivector
let rotor = &Multivector::scalar(0.5_f64.sqrt()) + &(&e1 * &e2) * 0.5_f64.sqrt();
let even = rotor.even();
assert!(relative_eq!(even, rotor, epsilon = 1e-10, max_relative = 1e-10));
Source

pub fn odd(&self) -> Self

Extracts the odd part of this multivector (grades 1, 3, 5, …).

§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;
use approx::relative_eq;

let v: Multivector<f64, Euclidean3> = Multivector::vector(&[1.0, 2.0, 3.0]);
let odd = v.odd();
assert!(relative_eq!(odd, v, epsilon = 1e-10, max_relative = 1e-10)); // Vectors are odd
Source

pub fn grade(&self, epsilon: T) -> Option<usize>

Returns the grade of this multivector if it is homogeneous (all non-zero components have the same grade), or None if it contains multiple grades.

§Arguments
  • epsilon - Tolerance for considering a coefficient as zero
§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

let v: Multivector<f64, Euclidean3> = Multivector::vector(&[1.0, 2.0, 3.0]);
assert_eq!(v.grade(1e-10), Some(1)); // Pure vector

let mixed = &v + &Multivector::scalar(1.0);
assert_eq!(mixed.grade(1e-10), None); // Mixed grades
Source

pub fn pseudoscalar() -> Self

Returns the unit pseudoscalar I = e₁e₂...eₙ.

The pseudoscalar is the highest-grade basis blade, representing the oriented unit volume element. In n dimensions, it has grade n.

§Properties
  • In Euclidean 2D: I² = -1 (behaves like imaginary unit)
  • In Euclidean 3D: I² = -1
  • In Euclidean 4D: I² = +1
§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

let ps: Multivector<f64, Euclidean3> = Multivector::pseudoscalar();
assert_eq!(ps.grade(1e-10), Some(3)); // Trivector in 3D

// I² = -1 in Euclidean 3D
let ps_sq = &ps * &ps;
assert!((ps_sq.scalar_part() - (-1.0)).abs() < 1e-10);
Source§

impl<T: Float, S: Signature> Multivector<T, S>

Source

pub fn exterior(&self, other: &Self) -> Self

Computes the exterior (wedge) product: a ∧ b.

The exterior product extracts the grade-raising part of the geometric product. For a grade-k blade A and grade-j blade B, the result has grade k + j.

§Properties
  • Anticommutative for vectors: a ∧ b = -(b ∧ a)
  • Associative: (a ∧ b) ∧ c = a ∧ (b ∧ c)
  • Grade-raising: grade(A ∧ B) = grade(A) + grade(B)
§Geometric Interpretation

The wedge product of two vectors creates a bivector representing the oriented parallelogram spanned by those vectors. More generally, it creates higher-grade blades representing oriented subspaces.

§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;
use approx::relative_eq;

let e1: Multivector<f64, Euclidean3> = Multivector::basis_vector(0);
let e2: Multivector<f64, Euclidean3> = Multivector::basis_vector(1);

// e₁ ∧ e₂ = e₁₂ (bivector)
let e12 = e1.exterior(&e2);
assert_eq!(e12.grade(1e-10), Some(2));

// Anticommutativity: e₂ ∧ e₁ = -e₁₂
let e21 = e2.exterior(&e1);
assert!(relative_eq!(e21, -&e12, epsilon = 1e-10, max_relative = 1e-10));
Source

pub fn outer(&self, other: &Self) -> Self

👎Deprecated since 0.2.0: use exterior instead

Deprecated alias for exterior.

Use exterior instead. This method will be removed in a future version.

Source

pub fn left_contract(&self, other: &Self) -> Self

Computes the left contraction: A ⌋ B.

The left contraction extracts the grade-lowering part of the geometric product. For a grade-k blade A and grade-j blade B where k ≤ j, the result has grade j - k.

§Mathematical Definition

A ⌋ B is the part of AB with grade grade(B) - grade(A). If grade(A) > grade(B), the result is zero.

§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

let e1: Multivector<f64, Euclidean3> = Multivector::basis_vector(0);
let e2: Multivector<f64, Euclidean3> = Multivector::basis_vector(1);
let e12 = e1.exterior(&e2);

// Vector left-contracted with bivector gives vector
let result = e1.left_contract(&e12);
assert_eq!(result.grade(1e-10), Some(1));
Source

pub fn right_contract(&self, other: &Self) -> Self

Computes the right contraction: A ⌊ B.

The right contraction is the “mirror” of the left contraction. For a grade-k blade A and grade-j blade B where j ≤ k, the result has grade k - j.

§Mathematical Definition

A ⌊ B is the part of AB with grade grade(A) - grade(B). If grade(B) > grade(A), the result is zero.

§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

let e1: Multivector<f64, Euclidean3> = Multivector::basis_vector(0);
let e2: Multivector<f64, Euclidean3> = Multivector::basis_vector(1);
let e12 = e1.exterior(&e2);

// Bivector right-contracted with vector gives vector
let result = e12.right_contract(&e1);
assert_eq!(result.grade(1e-10), Some(1));
Source

pub fn inner(&self, other: &Self) -> Self

Computes the inner product: a · b.

For vectors, this is the standard dot product, returning a scalar. More generally, this is implemented as the left contraction.

§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

let a: Multivector<f64, Euclidean3> = Multivector::vector(&[1.0, 2.0, 3.0]);
let b: Multivector<f64, Euclidean3> = Multivector::vector(&[4.0, 5.0, 6.0]);

// a · b = 1*4 + 2*5 + 3*6 = 32
let dot = a.inner(&b);
assert!((dot.scalar_part() - 32.0).abs() < 1e-10);
Source

pub fn dual(&self) -> Self

Computes the Hodge dual: A* = A ⌋ I⁻¹.

The dual maps a grade-k blade to a grade-(n-k) blade, where n is the dimension. It represents the orthogonal complement of a subspace.

§Properties
  • dual(dual(A)) = ±A (sign depends on dimension and signature)
  • Maps vectors to pseudovectors, bivectors to vectors (in 3D), etc.
§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

let e1: Multivector<f64, Euclidean3> = Multivector::basis_vector(0);

// In 3D, dual of a vector is a bivector
let e1_dual = e1.dual();
assert_eq!(e1_dual.grade(1e-10), Some(2));
Source

pub fn undual(&self) -> Self

Computes the undual (inverse of dual): A⁻* = A ⌋ I.

§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;
use approx::relative_eq;

let e1: Multivector<f64, Euclidean3> = Multivector::basis_vector(0);
let roundtrip = e1.dual().undual();
assert!(relative_eq!(roundtrip, e1, epsilon = 1e-10, max_relative = 1e-10));
Source

pub fn complement(&self) -> Self

Computes the complement of a multivector.

The complement maps a grade-k blade to a grade-(n-k) blade by XOR with the pseudoscalar index. The sign is determined by the number of transpositions needed to put blade ∧ complement(blade) into canonical order.

This is used in RGA for the regressive product: a ∨ b = complement(complement(a) ∧ complement(b))

§Properties
  • grade(complement(a)) = n - grade(a) where n is the dimension
  • complement(complement(a)) = ±a
  • Different from Hodge dual (which uses contraction)
§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

let e1: Multivector<f64, Euclidean3> = Multivector::basis_vector(0);

// Complement of e1 in 3D gives a bivector (e23)
let e1_comp = e1.complement();
assert_eq!(e1_comp.grade(1e-10), Some(2));
Source

pub fn right_complement(&self) -> Self

👎Deprecated since 0.3.0: use complement instead

Deprecated: Use complement instead.

The right complement maps a grade-k blade to a grade-(n-k) blade. This is used in RGA for the regressive product.

Source

pub fn left_complement(&self) -> Self

👎Deprecated since 0.3.0: use complement instead

Deprecated: Use complement instead.

The left complement maps a grade-k blade to a grade-(n-k) blade. This is used in RGA for computing the “undual” in the regressive product.

Source

pub fn regressive(&self, other: &Self) -> Self

Computes the regressive (vee) product: a ∨ b = complement(complement(a) ∧ complement(b)).

The regressive product is the dual of the outer product. While the outer product represents the “join” (span) of subspaces, the regressive product represents the “meet” (intersection).

§Formula

Using complement notation:

  • a ∨ b = complement(complement(a) ∧ complement(b))
§Properties
  • Grade-lowering (opposite of wedge)
  • Associative
§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

let e1: Multivector<f64, Euclidean3> = Multivector::basis_vector(0);
let e2: Multivector<f64, Euclidean3> = Multivector::basis_vector(1);
let e12 = e1.exterior(&e2);
let e23 = e2.exterior(&Multivector::basis_vector(2));

// Meet of two planes sharing e2 should give e2 direction
let meet = e12.regressive(&e23);
assert_eq!(meet.grade(1e-10), Some(1));
Source

pub fn antiwedge(&self, other: &Self) -> Self

Computes the antiwedge (exterior antiproduct): a ∨ b.

This is an alias for regressive. The antiwedge is the dual of the wedge product, representing the “meet” (intersection) of subspaces rather than the “join” (span).

§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

let e12: Multivector<f64, Euclidean3> =
    Multivector::basis_vector(0).exterior(&Multivector::basis_vector(1));
let e23: Multivector<f64, Euclidean3> =
    Multivector::basis_vector(1).exterior(&Multivector::basis_vector(2));

// Antiwedge of two planes gives their intersection (a line)
let intersection = e12.antiwedge(&e23);
Source

pub fn bulk_dual(&self) -> Self

Computes the bulk dual (★): a★ = ã ⊙ 𝟙.

The bulk dual is computed as reverse(a) * pseudoscalar. It maps a blade to its orthogonal complement using the metric (bulk) structure.

§Properties
  • grade(a★) = n - grade(a) where n is the dimension
  • (a★)★ = ±a (up to sign, involutory)
§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

let e1: Multivector<f64, Euclidean3> = Multivector::basis_vector(0);

// In 3D, bulk dual of a vector is a bivector
let e1_bulk_dual = e1.bulk_dual();
assert_eq!(e1_bulk_dual.grade(1e-10), Some(2));
Source

pub fn left_bulk_dual(&self) -> Self

Computes the left bulk dual (★): ★a = 𝟙 ⊙ ã.

The left bulk dual is computed as pseudoscalar * reverse(a). This is the “undual” operation for the bulk dual, used in computing the antiproduct.

§Properties
  • grade(★a) = n - grade(a) where n is the dimension
  • ★(a★) = ±a (recovers original up to sign)
§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

let e1: Multivector<f64, Euclidean3> = Multivector::basis_vector(0);

// In 3D, left bulk dual of a vector is a bivector
let e1_left_dual = e1.left_bulk_dual();
assert_eq!(e1_left_dual.grade(1e-10), Some(2));
Source

pub fn weight_dual(&self) -> Self

Computes the weight dual (☆): a☆ = ã ⊛ 1.

The weight dual is computed as reverse(a) ⊛ scalar where ⊛ is the geometric antiproduct. It maps a blade to its orthogonal complement using the anti-metric (weight) structure.

§Properties
  • grade(a☆) = n - grade(a) where n is the dimension
  • Uses the antiproduct with the scalar (grade-0 element)
§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

let e1: Multivector<f64, Euclidean3> = Multivector::basis_vector(0);

// In 3D, weight dual of a vector is a bivector
let e1_weight_dual = e1.weight_dual();
assert_eq!(e1_weight_dual.grade(1e-10), Some(2));
Source

pub fn bulk_contraction(&self, other: &Self) -> Self

Computes the bulk contraction: a ∨ b★.

The bulk contraction is the antiwedge of a with the bulk dual of b. This is one of the four interior products in Rigid Geometric Algebra.

§Properties
  • Grade-lowering operation
  • Measures how much b “projects onto” the complement of a
§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

let e1: Multivector<f64, Euclidean3> = Multivector::basis_vector(0);
let e2: Multivector<f64, Euclidean3> = Multivector::basis_vector(1);

let result = e1.bulk_contraction(&e2);
Source

pub fn weight_contraction(&self, other: &Self) -> Self

Computes the weight contraction: a ∨ b☆.

The weight contraction is the antiwedge of a with the weight dual of b. This is one of the four interior products in Rigid Geometric Algebra.

§Properties
  • Grade-lowering operation
  • Uses the anti-metric structure
§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

let e1: Multivector<f64, Euclidean3> = Multivector::basis_vector(0);
let e2: Multivector<f64, Euclidean3> = Multivector::basis_vector(1);

let result = e1.weight_contraction(&e2);
Source

pub fn bulk_expansion(&self, other: &Self) -> Self

Computes the bulk expansion: a ∧ b★.

The bulk expansion is the wedge of a with the bulk dual of b. This is one of the four interior products in Rigid Geometric Algebra.

§Properties
  • Can be grade-raising or grade-lowering depending on inputs
  • Measures the “exterior” relationship using bulk structure
§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

let e1: Multivector<f64, Euclidean3> = Multivector::basis_vector(0);
let e2: Multivector<f64, Euclidean3> = Multivector::basis_vector(1);

let result = e1.bulk_expansion(&e2);
Source

pub fn weight_expansion(&self, other: &Self) -> Self

Computes the weight expansion: a ∧ b☆.

The weight expansion is the wedge of a with the weight dual of b. This is one of the four interior products in Rigid Geometric Algebra.

§Properties
  • Can be grade-raising or grade-lowering depending on inputs
  • Uses the anti-metric structure
§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

let e1: Multivector<f64, Euclidean3> = Multivector::basis_vector(0);
let e2: Multivector<f64, Euclidean3> = Multivector::basis_vector(1);

let result = e1.weight_expansion(&e2);
Source

pub fn antiproduct(&self, other: &Self) -> Self

Computes the geometric antiproduct: a ⊛ b = undual(dual(a) × dual(b)).

The geometric antiproduct is the dual of the geometric product. In PGA (Projective Geometric Algebra), the antiproduct is essential for correct motor transformations because it properly handles the degenerate direction.

§Properties
  • dual(a × b) = dual(a) ⊛ dual(b) (duality relationship)
  • Used for PGA sandwich transformations: M ⊛ x ⊛ rev(M)
§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

let e1: Multivector<f64, Euclidean3> = Multivector::basis_vector(0);
let e2: Multivector<f64, Euclidean3> = Multivector::basis_vector(1);

// Antiproduct of vectors
let result = e1.antiproduct(&e2);
Source

pub fn antisandwich(&self, x: &Self) -> Self

Computes the antisandwich product: R ⊛ x ⊛ R̃.

The antisandwich uses the geometric antiproduct instead of the geometric product. In PGA, this is the correct transformation for motors because it handles translations properly (which the regular sandwich cannot due to the degenerate metric e₀² = 0).

§Properties
  • Preserves grade of the argument
  • Correctly transforms points under translation in PGA
§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

// Create a rotor (identity in this case)
let rotor: Multivector<f64, Euclidean3> = Multivector::scalar(1.0);
let e1: Multivector<f64, Euclidean3> = Multivector::basis_vector(0);

// Compute the antisandwich transformation
let _result = rotor.antisandwich(&e1);
§Note

For PGA (Projective Geometric Algebra), use the specialized types in clifford::specialized::projective::dim3 which have optimized antisandwich implementations that handle the degenerate metric correctly.

Source

pub fn sandwich(&self, x: &Self) -> Self

Computes the sandwich product: R x R̃.

The sandwich product is the fundamental operation for transformations in geometric algebra:

  • Reflections: n x n where n is a unit vector (reflects across plane normal to n)
  • Rotations: R x R̃ where R is a rotor
§Properties
  • Preserves grade of the argument
  • Preserves norm in Euclidean space
  • Composition: R₂(R₁ x R₁̃)R₂̃ = (R₂R₁) x (R₂R₁)̃
§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

// Reflect a vector across the yz-plane (normal = e₁)
let n: Multivector<f64, Euclidean3> = Multivector::basis_vector(0); // e₁
let v: Multivector<f64, Euclidean3> = Multivector::vector(&[1.0, 2.0, 3.0]);

let reflected = n.sandwich(&v);
// x component flips sign, y and z stay same
assert!((reflected.norm() - v.norm()).abs() < 1e-10);
Source

pub fn project(&self, other: &Self) -> Self

Computes the projection of self onto other: other ∨ (self ∧ other☆).

The projection finds the part of self that lies “on” or “inside” other. Uses the weight dual (☆) of the target geometry.

§Geometric Interpretation

In PGA (Projective Geometric Algebra):

  • Projecting a point onto a line gives the closest point on the line
  • Projecting a point onto a plane gives the closest point on the plane
  • Projecting a line onto a plane gives the line’s intersection with the plane
§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

let a: Multivector<f64, Euclidean3> = Multivector::basis_vector(0); // e₁
let b: Multivector<f64, Euclidean3> = Multivector::basis_vector(1); // e₂

let _proj = a.project(&b);
Source

pub fn antiproject(&self, other: &Self) -> Self

Computes the antiprojection of self onto other: other ∧ (self ∨ other☆).

The antiprojection finds geometry that passes through self and is perpendicular to other. Uses the weight dual (☆) of the target geometry.

§Geometric Interpretation

In PGA (Projective Geometric Algebra):

  • Antiprojecting a point onto a line gives the plane through the point perpendicular to the line
  • Antiprojecting a point onto a plane gives the line through the point perpendicular to the plane
§Example
use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;

let a: Multivector<f64, Euclidean3> = Multivector::basis_vector(0); // e₁
let b: Multivector<f64, Euclidean3> = Multivector::basis_vector(1); // e₂

let _antiproj = a.antiproject(&b);

Trait Implementations§

Source§

impl<T: Float, S: Signature> AbsDiffEq for Multivector<T, S>

Source§

type Epsilon = T

Used for specifying relative comparisons.
Source§

fn default_epsilon() -> Self::Epsilon

The default tolerance to use when testing values that are close together. Read more
Source§

fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool

A test for equality that uses the absolute difference to compute the approximate equality of two numbers.
Source§

fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool

The inverse of AbsDiffEq::abs_diff_eq.
Source§

impl<T: Float, S: Signature> Add<&Multivector<T, S>> for Multivector<T, S>

Source§

type Output = Multivector<T, S>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Self) -> Self::Output

Performs the + operation. Read more
Source§

impl<T: Float, S: Signature> Add<Multivector<T, S>> for &Multivector<T, S>

Source§

type Output = Multivector<T, S>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Multivector<T, S>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T: Float, S: Signature> Add for &Multivector<T, S>

Source§

type Output = Multivector<T, S>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl<T: Float, S: Signature> Add for Multivector<T, S>

Source§

type Output = Multivector<T, S>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl<T: Float, S: Signature> AddAssign<&Multivector<T, S>> for Multivector<T, S>

Source§

fn add_assign(&mut self, rhs: &Self)

Performs the += operation. Read more
Source§

impl<T: Float, S: Signature> AddAssign for Multivector<T, S>

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl<T, S> Arbitrary for Multivector<T, S>

Source§

type Parameters = ()

The type of parameters that arbitrary_with accepts for configuration of the generated Strategy. Parameters must implement Default.
Source§

type Strategy = BoxedStrategy<Multivector<T, S>>

The type of Strategy used to generate values of type Self.
Source§

fn arbitrary_with(_: Self::Parameters) -> Self::Strategy

Generates a Strategy for producing arbitrary values of type the implementing type (Self). The strategy is passed the arguments given in args. Read more
Source§

fn arbitrary() -> Self::Strategy

Generates a Strategy for producing arbitrary values of type the implementing type (Self). Read more
Source§

impl AsRef<Multivector<f64, Euclidean3>> for NonZeroVectorE3

Source§

fn as_ref(&self) -> &Multivector<f64, Euclidean3>

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<Multivector<f64, Euclidean3>> for UnitVectorE3

Source§

fn as_ref(&self) -> &Multivector<f64, Euclidean3>

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<Multivector<f64, Euclidean3>> for VectorE3

Source§

fn as_ref(&self) -> &Multivector<f64, Euclidean3>

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<T: Float, S: Signature> BitXor<&Multivector<T, S>> for Multivector<T, S>

Source§

type Output = Multivector<T, S>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: &Multivector<T, S>) -> Self::Output

Performs the ^ operation. Read more
Source§

impl<T: Float, S: Signature> BitXor<Multivector<T, S>> for &Multivector<T, S>

Source§

type Output = Multivector<T, S>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: Multivector<T, S>) -> Self::Output

Performs the ^ operation. Read more
Source§

impl<T: Float, S: Signature> BitXor for &Multivector<T, S>

Wedge (exterior) product via ^ operator.

The ^ operator provides ergonomic syntax for the wedge product: a ^ b is equivalent to a.exterior(&b).

§Example

use clifford::algebra::Multivector;
use clifford::signature::Euclidean3;
use approx::relative_eq;

let e1: Multivector<f64, Euclidean3> = Multivector::basis_vector(0);
let e2: Multivector<f64, Euclidean3> = Multivector::basis_vector(1);

// e₁ ^ e₂ = e₁₂ (bivector)
let e12 = &e1 ^ &e2;
assert_eq!(e12.grade(1e-10), Some(2));

// Anticommutativity: e₂ ^ e₁ = -e₁₂
let e21 = &e2 ^ &e1;
assert!(relative_eq!(e21, -&e12, epsilon = 1e-10, max_relative = 1e-10));
Source§

type Output = Multivector<T, S>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: Self) -> Self::Output

Performs the ^ operation. Read more
Source§

impl<T: Float, S: Signature> BitXor for Multivector<T, S>

Source§

type Output = Multivector<T, S>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: Self) -> Self::Output

Performs the ^ operation. Read more
Source§

impl<T: Clone + Float, S: Clone + Signature> Clone for Multivector<T, S>
where S::NumBlades: Clone,

Source§

fn clone(&self) -> Multivector<T, S>

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<T: Float, S: Signature> Debug for Multivector<T, S>

Source§

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

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

impl<T: Float, S: Signature> Default for Multivector<T, S>

Source§

fn default() -> Self

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

impl<'de, T, S: Signature> Deserialize<'de> for Multivector<T, S>
where T: Deserialize<'de> + Float,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<T: Float, S: Signature> Display for Multivector<T, S>

Source§

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

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

impl<T: Float, S: Signature> Div<T> for &Multivector<T, S>

Source§

type Output = Multivector<T, S>

The resulting type after applying the / operator.
Source§

fn div(self, scalar: T) -> Self::Output

Performs the / operation. Read more
Source§

impl<T: Float, S: Signature> Div<T> for Multivector<T, S>

Source§

type Output = Multivector<T, S>

The resulting type after applying the / operator.
Source§

fn div(self, scalar: T) -> Self::Output

Performs the / operation. Read more
Source§

impl<T: Float> From<Bivector<T>> for Multivector<T, Cl0_2_0>

Source§

fn from(value: Bivector<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Bivector<T>> for Multivector<T, Cl0_2_1>

Source§

fn from(value: Bivector<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Bivector<T>> for Multivector<T, Cl1_1_0>

Source§

fn from(value: Bivector<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Bivector<T>> for Multivector<T, Cl3_1_0>

Source§

fn from(value: Bivector<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Bivector<T>> for Multivector<T, Euclidean2>

Source§

fn from(value: Bivector<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Bivector<T>> for Multivector<T, Euclidean3>

Source§

fn from(value: Bivector<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Circle<T>> for Multivector<T, Cl3_1_0>

Source§

fn from(value: Circle<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Circle<T>> for Multivector<T, Conformal3>

Source§

fn from(value: Circle<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Complex<T>> for Multivector<T, Cl0_1_0>

Source§

fn from(value: Complex<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Dipole<T>> for Multivector<T, Conformal3>

Source§

fn from(value: Dipole<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Dual<T>> for Multivector<T, Cl0_0_1>

Source§

fn from(value: Dual<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<DualQuaternion<T>> for Multivector<T, Cl0_2_1>

Source§

fn from(value: DualQuaternion<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<DualUnit<T>> for Multivector<T, Cl0_0_1>

Source§

fn from(value: DualUnit<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Eventor<T>> for Multivector<T, Cl1_1_0>

Source§

fn from(value: Eventor<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Eventor<T>> for Multivector<T, Cl3_1_0>

Source§

fn from(value: Eventor<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<FlatPoint<T>> for Multivector<T, Cl3_1_0>

Source§

fn from(value: FlatPoint<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<FlatPoint<T>> for Multivector<T, Conformal3>

Source§

fn from(value: FlatPoint<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Flector<T>> for Multivector<T, Projective2>

Source§

fn from(value: Flector<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Flector<T>> for Multivector<T, Projective3>

Source§

fn from(value: Flector<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<HypUnit<T>> for Multivector<T, Cl1_0_0>

Source§

fn from(value: HypUnit<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Hyperbolic<T>> for Multivector<T, Cl1_0_0>

Source§

fn from(value: Hyperbolic<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<ImagUnit<T>> for Multivector<T, Cl0_1_0>

Source§

fn from(value: ImagUnit<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Imaginary<T>> for Multivector<T, Cl0_2_0>

Source§

fn from(value: Imaginary<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Line<T>> for Multivector<T, Cl2_1_0>

Source§

fn from(value: Line<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Line<T>> for Multivector<T, Cl3_1_0>

Source§

fn from(value: Line<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Line<T>> for Multivector<T, Conformal3>

Source§

fn from(value: Line<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Line<T>> for Multivector<T, Euclidean3>

Source§

fn from(value: Line<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Line<T>> for Multivector<T, Projective2>

Source§

fn from(value: Line<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Line<T>> for Multivector<T, Projective3>

Source§

fn from(value: Line<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Motor<T>> for Multivector<T, Cl3_1_0>

Source§

fn from(value: Motor<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Motor<T>> for Multivector<T, Conformal3>

Source§

fn from(value: Motor<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Motor<T>> for Multivector<T, Projective2>

Source§

fn from(value: Motor<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Motor<T>> for Multivector<T, Projective3>

Source§

fn from(value: Motor<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Multivector<T, Cl0_0_1>> for Dual<T>

Source§

fn from(mv: Multivector<T, Cl0_0_1>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl0_0_1>> for DualUnit<T>

Source§

fn from(mv: Multivector<T, Cl0_0_1>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl0_0_1>> for Scalar<T>

Source§

fn from(mv: Multivector<T, Cl0_0_1>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl0_1_0>> for Complex<T>

Source§

fn from(mv: Multivector<T, Cl0_1_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl0_1_0>> for ImagUnit<T>

Source§

fn from(mv: Multivector<T, Cl0_1_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl0_1_0>> for Scalar<T>

Source§

fn from(mv: Multivector<T, Cl0_1_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl0_2_0>> for Bivector<T>

Source§

fn from(mv: Multivector<T, Cl0_2_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl0_2_0>> for Imaginary<T>

Source§

fn from(mv: Multivector<T, Cl0_2_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl0_2_0>> for Quaternion<T>

Source§

fn from(mv: Multivector<T, Cl0_2_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl0_2_0>> for Scalar<T>

Source§

fn from(mv: Multivector<T, Cl0_2_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl0_2_1>> for Bivector<T>

Source§

fn from(mv: Multivector<T, Cl0_2_1>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl0_2_1>> for DualQuaternion<T>

Source§

fn from(mv: Multivector<T, Cl0_2_1>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl0_2_1>> for Scalar<T>

Source§

fn from(mv: Multivector<T, Cl0_2_1>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl0_2_1>> for Trivector<T>

Source§

fn from(mv: Multivector<T, Cl0_2_1>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl0_2_1>> for Vector<T>

Source§

fn from(mv: Multivector<T, Cl0_2_1>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl1_0_0>> for HypUnit<T>

Source§

fn from(mv: Multivector<T, Cl1_0_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl1_0_0>> for Hyperbolic<T>

Source§

fn from(mv: Multivector<T, Cl1_0_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl1_0_0>> for Scalar<T>

Source§

fn from(mv: Multivector<T, Cl1_0_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl1_1_0>> for Bivector<T>

Source§

fn from(mv: Multivector<T, Cl1_1_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl1_1_0>> for Eventor<T>

Source§

fn from(mv: Multivector<T, Cl1_1_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl1_1_0>> for Scalar<T>

Source§

fn from(mv: Multivector<T, Cl1_1_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl1_1_0>> for Spacetime<T>

Source§

fn from(mv: Multivector<T, Cl1_1_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl1_1_0>> for Vector<T>

Source§

fn from(mv: Multivector<T, Cl1_1_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl2_1_0>> for Line<T>

Source§

fn from(mv: Multivector<T, Cl2_1_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl2_1_0>> for Point<T>

Source§

fn from(mv: Multivector<T, Cl2_1_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl2_1_0>> for Pseudoscalar<T>

Source§

fn from(mv: Multivector<T, Cl2_1_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl2_1_0>> for Rotor<T>

Source§

fn from(mv: Multivector<T, Cl2_1_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl2_1_0>> for Scalar<T>

Source§

fn from(mv: Multivector<T, Cl2_1_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl3_1_0>> for Bivector<T>

Source§

fn from(mv: Multivector<T, Cl3_1_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl3_1_0>> for Circle<T>

Source§

fn from(mv: Multivector<T, Cl3_1_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl3_1_0>> for Eventor<T>

Source§

fn from(mv: Multivector<T, Cl3_1_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl3_1_0>> for FlatPoint<T>

Source§

fn from(mv: Multivector<T, Cl3_1_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl3_1_0>> for Line<T>

Source§

fn from(mv: Multivector<T, Cl3_1_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl3_1_0>> for Motor<T>

Source§

fn from(mv: Multivector<T, Cl3_1_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl3_1_0>> for PointPair<T>

Source§

fn from(mv: Multivector<T, Cl3_1_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl3_1_0>> for Pseudoscalar<T>

Source§

fn from(mv: Multivector<T, Cl3_1_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl3_1_0>> for Pseudoscalar<T>

Source§

fn from(mv: Multivector<T, Cl3_1_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl3_1_0>> for RoundPoint<T>

Source§

fn from(mv: Multivector<T, Cl3_1_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl3_1_0>> for Scalar<T>

Source§

fn from(mv: Multivector<T, Cl3_1_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl3_1_0>> for Scalar<T>

Source§

fn from(mv: Multivector<T, Cl3_1_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl3_1_0>> for Trivector<T>

Source§

fn from(mv: Multivector<T, Cl3_1_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Cl3_1_0>> for Vector<T>

Source§

fn from(mv: Multivector<T, Cl3_1_0>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Conformal3>> for Circle<T>

Source§

fn from(mv: Multivector<T, Conformal3>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Conformal3>> for Dipole<T>

Source§

fn from(mv: Multivector<T, Conformal3>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Conformal3>> for FlatPoint<T>

Source§

fn from(mv: Multivector<T, Conformal3>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Conformal3>> for Line<T>

Source§

fn from(mv: Multivector<T, Conformal3>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Conformal3>> for Motor<T>

Source§

fn from(mv: Multivector<T, Conformal3>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Conformal3>> for Plane<T>

Source§

fn from(mv: Multivector<T, Conformal3>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Conformal3>> for Pseudoscalar<T>

Source§

fn from(mv: Multivector<T, Conformal3>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Conformal3>> for RoundPoint<T>

Source§

fn from(mv: Multivector<T, Conformal3>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Conformal3>> for Scalar<T>

Source§

fn from(mv: Multivector<T, Conformal3>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Conformal3>> for Sphere<T>

Source§

fn from(mv: Multivector<T, Conformal3>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Euclidean2>> for Bivector<T>

Source§

fn from(mv: Multivector<T, Euclidean2>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Euclidean2>> for Rotor<T>

Source§

fn from(mv: Multivector<T, Euclidean2>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Euclidean2>> for Scalar<T>

Source§

fn from(mv: Multivector<T, Euclidean2>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Euclidean2>> for Vector<T>

Source§

fn from(mv: Multivector<T, Euclidean2>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Euclidean3>> for Bivector<T>

Source§

fn from(mv: Multivector<T, Euclidean3>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Euclidean3>> for Line<T>

Source§

fn from(mv: Multivector<T, Euclidean3>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Euclidean3>> for Point<T>

Source§

fn from(mv: Multivector<T, Euclidean3>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Euclidean3>> for Pseudoscalar<T>

Source§

fn from(mv: Multivector<T, Euclidean3>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Euclidean3>> for Rotor<T>

Source§

fn from(mv: Multivector<T, Euclidean3>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Euclidean3>> for Rotor<T>

Source§

fn from(mv: Multivector<T, Euclidean3>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Euclidean3>> for Scalar<T>

Source§

fn from(mv: Multivector<T, Euclidean3>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Euclidean3>> for Scalar<T>

Source§

fn from(mv: Multivector<T, Euclidean3>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Euclidean3>> for Trivector<T>

Source§

fn from(mv: Multivector<T, Euclidean3>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Euclidean3>> for Vector<T>

Source§

fn from(mv: Multivector<T, Euclidean3>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Projective2>> for Flector<T>

Source§

fn from(mv: Multivector<T, Projective2>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Projective2>> for Line<T>

Source§

fn from(mv: Multivector<T, Projective2>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Projective2>> for Motor<T>

Source§

fn from(mv: Multivector<T, Projective2>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Projective2>> for Point<T>

Source§

fn from(mv: Multivector<T, Projective2>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Projective2>> for Scalar<T>

Source§

fn from(mv: Multivector<T, Projective2>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Projective2>> for Trivector<T>

Source§

fn from(mv: Multivector<T, Projective2>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Projective3>> for Flector<T>

Source§

fn from(mv: Multivector<T, Projective3>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Projective3>> for Line<T>

Source§

fn from(mv: Multivector<T, Projective3>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Projective3>> for Motor<T>

Source§

fn from(mv: Multivector<T, Projective3>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Projective3>> for Plane<T>

Source§

fn from(mv: Multivector<T, Projective3>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Projective3>> for Point<T>

Source§

fn from(mv: Multivector<T, Projective3>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Projective3>> for Quadvector<T>

Source§

fn from(mv: Multivector<T, Projective3>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl<T: Float> From<Multivector<T, Projective3>> for Scalar<T>

Source§

fn from(mv: Multivector<T, Projective3>) -> Self

Extracts this type from a multivector.

Note: This is a lossy projection that only extracts the relevant grades. Other components of the multivector are discarded.

Source§

impl From<NonZeroVectorE3> for Multivector<f64, Euclidean3>

Source§

fn from(v: NonZeroVectorE3) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Plane<T>> for Multivector<T, Conformal3>

Source§

fn from(value: Plane<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Plane<T>> for Multivector<T, Projective3>

Source§

fn from(value: Plane<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Point<T>> for Multivector<T, Cl2_1_0>

Source§

fn from(value: Point<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Point<T>> for Multivector<T, Euclidean3>

Source§

fn from(value: Point<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Point<T>> for Multivector<T, Projective2>

Source§

fn from(value: Point<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Point<T>> for Multivector<T, Projective3>

Source§

fn from(value: Point<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<PointPair<T>> for Multivector<T, Cl3_1_0>

Source§

fn from(value: PointPair<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Pseudoscalar<T>> for Multivector<T, Cl2_1_0>

Source§

fn from(value: Pseudoscalar<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Pseudoscalar<T>> for Multivector<T, Cl3_1_0>

Source§

fn from(value: Pseudoscalar<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Pseudoscalar<T>> for Multivector<T, Cl3_1_0>

Source§

fn from(value: Pseudoscalar<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Pseudoscalar<T>> for Multivector<T, Conformal3>

Source§

fn from(value: Pseudoscalar<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Pseudoscalar<T>> for Multivector<T, Euclidean3>

Source§

fn from(value: Pseudoscalar<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Quadvector<T>> for Multivector<T, Projective3>

Source§

fn from(value: Quadvector<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Quaternion<T>> for Multivector<T, Cl0_2_0>

Source§

fn from(value: Quaternion<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Rotor<T>> for Multivector<T, Cl2_1_0>

Source§

fn from(value: Rotor<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Rotor<T>> for Multivector<T, Euclidean2>

Source§

fn from(value: Rotor<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Rotor<T>> for Multivector<T, Euclidean3>

Source§

fn from(value: Rotor<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Rotor<T>> for Multivector<T, Euclidean3>

Source§

fn from(value: Rotor<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<RoundPoint<T>> for Multivector<T, Cl3_1_0>

Source§

fn from(value: RoundPoint<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<RoundPoint<T>> for Multivector<T, Conformal3>

Source§

fn from(value: RoundPoint<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Scalar<T>> for Multivector<T, Cl0_0_1>

Source§

fn from(value: Scalar<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Scalar<T>> for Multivector<T, Cl0_1_0>

Source§

fn from(value: Scalar<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Scalar<T>> for Multivector<T, Cl0_2_0>

Source§

fn from(value: Scalar<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Scalar<T>> for Multivector<T, Cl0_2_1>

Source§

fn from(value: Scalar<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Scalar<T>> for Multivector<T, Cl1_0_0>

Source§

fn from(value: Scalar<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Scalar<T>> for Multivector<T, Cl1_1_0>

Source§

fn from(value: Scalar<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Scalar<T>> for Multivector<T, Cl2_1_0>

Source§

fn from(value: Scalar<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Scalar<T>> for Multivector<T, Cl3_1_0>

Source§

fn from(value: Scalar<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Scalar<T>> for Multivector<T, Cl3_1_0>

Source§

fn from(value: Scalar<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Scalar<T>> for Multivector<T, Conformal3>

Source§

fn from(value: Scalar<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Scalar<T>> for Multivector<T, Euclidean2>

Source§

fn from(value: Scalar<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Scalar<T>> for Multivector<T, Euclidean3>

Source§

fn from(value: Scalar<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Scalar<T>> for Multivector<T, Euclidean3>

Source§

fn from(value: Scalar<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Scalar<T>> for Multivector<T, Projective2>

Source§

fn from(value: Scalar<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Scalar<T>> for Multivector<T, Projective3>

Source§

fn from(value: Scalar<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Spacetime<T>> for Multivector<T, Cl1_1_0>

Source§

fn from(value: Spacetime<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Sphere<T>> for Multivector<T, Conformal3>

Source§

fn from(value: Sphere<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Trivector<T>> for Multivector<T, Cl0_2_1>

Source§

fn from(value: Trivector<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Trivector<T>> for Multivector<T, Cl3_1_0>

Source§

fn from(value: Trivector<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Trivector<T>> for Multivector<T, Euclidean3>

Source§

fn from(value: Trivector<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Trivector<T>> for Multivector<T, Projective2>

Source§

fn from(value: Trivector<T>) -> Self

Converts to this type from the input type.
Source§

impl From<UnitVectorE3> for Multivector<f64, Euclidean3>

Source§

fn from(v: UnitVectorE3) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Vector<T>> for Multivector<T, Cl0_2_1>

Source§

fn from(value: Vector<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Vector<T>> for Multivector<T, Cl1_1_0>

Source§

fn from(value: Vector<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Vector<T>> for Multivector<T, Cl3_1_0>

Source§

fn from(value: Vector<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Vector<T>> for Multivector<T, Euclidean2>

Source§

fn from(value: Vector<T>) -> Self

Converts to this type from the input type.
Source§

impl<T: Float> From<Vector<T>> for Multivector<T, Euclidean3>

Source§

fn from(value: Vector<T>) -> Self

Converts to this type from the input type.
Source§

impl From<VectorE3> for Multivector<f64, Euclidean3>

Source§

fn from(v: VectorE3) -> Self

Converts to this type from the input type.
Source§

impl<T: Float, S: Signature> Mul<&Multivector<T, S>> for Multivector<T, S>

Source§

type Output = Multivector<T, S>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Self) -> Self::Output

Performs the * operation. Read more
Source§

impl<T: Float, S: Signature> Mul<Multivector<T, S>> for &Multivector<T, S>

Source§

type Output = Multivector<T, S>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Multivector<T, S>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T: Float, S: Signature> Mul<T> for &Multivector<T, S>

Source§

type Output = Multivector<T, S>

The resulting type after applying the * operator.
Source§

fn mul(self, scalar: T) -> Self::Output

Performs the * operation. Read more
Source§

impl<T: Float, S: Signature> Mul<T> for Multivector<T, S>

Source§

type Output = Multivector<T, S>

The resulting type after applying the * operator.
Source§

fn mul(self, scalar: T) -> Self::Output

Performs the * operation. Read more
Source§

impl<T: Float, S: Signature> Mul for &Multivector<T, S>

Source§

fn mul(self, rhs: Self) -> Self::Output

Computes the geometric product of two multivectors.

The geometric product is the fundamental operation in geometric algebra. It is computed by distributing over all pairs of basis blades and using the blade multiplication rules defined by the metric signature.

§Complexity

O(4^n) where n is the dimension of the algebra.

Source§

type Output = Multivector<T, S>

The resulting type after applying the * operator.
Source§

impl<T: Float, S: Signature> Mul for Multivector<T, S>

Source§

type Output = Multivector<T, S>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
Source§

impl<T: Float, S: Signature> MulAssign<T> for Multivector<T, S>

Source§

fn mul_assign(&mut self, scalar: T)

Performs the *= operation. Read more
Source§

impl<T: Float, S: Signature> Neg for &Multivector<T, S>

Source§

type Output = Multivector<T, S>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<T: Float, S: Signature> Neg for Multivector<T, S>

Source§

type Output = Multivector<T, S>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<T: Float, S: Signature> PartialEq for Multivector<T, S>

Source§

fn eq(&self, other: &Self) -> 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<T: Float, S: Signature> RelativeEq for Multivector<T, S>

Source§

fn default_max_relative() -> Self::Epsilon

The default relative tolerance for testing values that are far-apart. Read more
Source§

fn relative_eq( &self, other: &Self, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool

A test for equality that uses a relative comparison if the values are far apart.
Source§

fn relative_ne( &self, other: &Rhs, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool

The inverse of RelativeEq::relative_eq.
Source§

impl<T, S: Signature> Serialize for Multivector<T, S>
where T: Serialize + Float,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<T: Float, S: Signature> Sub<&Multivector<T, S>> for Multivector<T, S>

Source§

type Output = Multivector<T, S>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Self) -> Self::Output

Performs the - operation. Read more
Source§

impl<T: Float, S: Signature> Sub<Multivector<T, S>> for &Multivector<T, S>

Source§

type Output = Multivector<T, S>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Multivector<T, S>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T: Float, S: Signature> Sub for &Multivector<T, S>

Source§

type Output = Multivector<T, S>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl<T: Float, S: Signature> Sub for Multivector<T, S>

Source§

type Output = Multivector<T, S>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl<T: Float, S: Signature> SubAssign<&Multivector<T, S>> for Multivector<T, S>

Source§

fn sub_assign(&mut self, rhs: &Self)

Performs the -= operation. Read more
Source§

impl<T: Float, S: Signature> SubAssign for Multivector<T, S>

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

impl<T: Float, S: Signature> UlpsEq for Multivector<T, S>

Source§

fn default_max_ulps() -> u32

The default ULPs to tolerate when testing values that are far-apart. Read more
Source§

fn ulps_eq(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool

A test for equality that uses units in the last place (ULP) if the values are far apart.
Source§

fn ulps_ne(&self, other: &Rhs, epsilon: Self::Epsilon, max_ulps: u32) -> bool

The inverse of UlpsEq::ulps_eq.
Source§

impl<T: Float, S: Signature> Copy for Multivector<T, S>
where GenericArray<T, S::NumBlades>: Copy,

Auto Trait Implementations§

§

impl<T, S> Freeze for Multivector<T, S>

§

impl<T, S> RefUnwindSafe for Multivector<T, S>

§

impl<T, S> Send for Multivector<T, S>
where T: Send, S: Send,

§

impl<T, S> Sync for Multivector<T, S>
where T: Sync, S: Sync,

§

impl<T, S> Unpin for Multivector<T, S>
where <<S as Signature>::NumBlades as ArrayLength>::ArrayType<T>: Unpin, S: Unpin,

§

impl<T, S> UnwindSafe for Multivector<T, S>

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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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

Source§

impl<T, Right> ClosedAdd<Right> for T
where T: Add<Right, Output = T> + AddAssign<Right>,

Source§

impl<T, Right> ClosedAddAssign<Right> for T
where T: ClosedAdd<Right> + AddAssign<Right>,

Source§

impl<T, Right> ClosedMul<Right> for T
where T: Mul<Right, Output = T> + MulAssign<Right>,

Source§

impl<T, Right> ClosedMulAssign<Right> for T
where T: ClosedMul<Right> + MulAssign<Right>,

Source§

impl<T> ClosedNeg for T
where T: Neg<Output = T>,

Source§

impl<T, Right> ClosedSub<Right> for T
where T: Sub<Right, Output = T> + SubAssign<Right>,

Source§

impl<T, Right> ClosedSubAssign<Right> for T
where T: ClosedSub<Right> + SubAssign<Right>,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,