pub struct So3Algebra(/* private fields */);Expand description
Lie algebra so(3) ≅ ℝ³
Elements of so(3) are 3×3 real antisymmetric matrices, which we represent as 3-vectors via the natural isomorphism with ℝ³.
§Isomorphism with ℝ³
An element v = (x, y, z) ∈ ℝ³ corresponds to the antisymmetric matrix:
[v]_× = [[0, -z, y], [z, 0, -x], [-y, x, 0]]This satisfies: [v]_× · w = v × w (cross product)
§Basis Elements
The standard basis corresponds to angular momentum operators:
L_x = (1, 0, 0) ↔ [[0, 0, 0], [0, 0, -1], [0, 1, 0]]
L_y = (0, 1, 0) ↔ [[0, 0, 1], [0, 0, 0], [-1, 0, 0]]
L_z = (0, 0, 1) ↔ [[0, -1, 0], [1, 0, 0], [0, 0, 0]]Implementations§
Source§impl So3Algebra
impl So3Algebra
Trait Implementations§
Source§impl AbsDiffEq for So3Algebra
impl AbsDiffEq for So3Algebra
Source§fn default_epsilon() -> Self::Epsilon
fn default_epsilon() -> Self::Epsilon
Source§fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
Source§fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
AbsDiffEq::abs_diff_eq.Source§impl Add<&So3Algebra> for &So3Algebra
impl Add<&So3Algebra> for &So3Algebra
Source§type Output = So3Algebra
type Output = So3Algebra
+ operator.Source§fn add(self, rhs: &So3Algebra) -> So3Algebra
fn add(self, rhs: &So3Algebra) -> So3Algebra
+ operation. Read moreSource§impl Add<&So3Algebra> for So3Algebra
impl Add<&So3Algebra> for So3Algebra
Source§type Output = So3Algebra
type Output = So3Algebra
+ operator.Source§fn add(self, rhs: &So3Algebra) -> So3Algebra
fn add(self, rhs: &So3Algebra) -> So3Algebra
+ operation. Read moreSource§impl Add<So3Algebra> for &So3Algebra
impl Add<So3Algebra> for &So3Algebra
Source§type Output = So3Algebra
type Output = So3Algebra
+ operator.Source§fn add(self, rhs: So3Algebra) -> So3Algebra
fn add(self, rhs: So3Algebra) -> So3Algebra
+ operation. Read moreSource§impl Add for So3Algebra
impl Add for So3Algebra
Source§impl Clone for So3Algebra
impl Clone for So3Algebra
Source§fn clone(&self) -> So3Algebra
fn clone(&self) -> So3Algebra
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for So3Algebra
impl Debug for So3Algebra
Source§impl Display for So3Algebra
impl Display for So3Algebra
Source§impl LieAlgebra for So3Algebra
impl LieAlgebra for So3Algebra
Source§fn bracket(&self, other: &Self) -> Self
fn bracket(&self, other: &Self) -> Self
Lie bracket for so(3): [v, w] = v × w (cross product)
For so(3) ≅ ℝ³, the Lie bracket is exactly the vector cross product.
§Properties
- Antisymmetric: [v, w] = -[w, v]
- Jacobi identity: [u, [v, w]] + [v, [w, u]] + [w, [u, v]] = 0
§Examples
use lie_groups::so3::So3Algebra;
use lie_groups::traits::LieAlgebra;
let lx = So3Algebra::basis_element(0); // (1, 0, 0)
let ly = So3Algebra::basis_element(1); // (0, 1, 0)
let bracket = lx.bracket(&ly); // (1,0,0) × (0,1,0) = (0,0,1)
// Should give L_z = (0, 0, 1)
assert!((bracket.components()[0]).abs() < 1e-10);
assert!((bracket.components()[1]).abs() < 1e-10);
assert!((bracket.components()[2] - 1.0).abs() < 1e-10);Source§fn basis_element(i: usize) -> Self
fn basis_element(i: usize) -> Self
Source§fn from_components(components: &[f64]) -> Self
fn from_components(components: &[f64]) -> Self
Source§impl Mul<So3Algebra> for f64
impl Mul<So3Algebra> for f64
Source§type Output = So3Algebra
type Output = So3Algebra
* operator.Source§fn mul(self, rhs: So3Algebra) -> So3Algebra
fn mul(self, rhs: So3Algebra) -> So3Algebra
* operation. Read moreSource§impl Mul<f64> for So3Algebra
impl Mul<f64> for So3Algebra
Source§impl Neg for So3Algebra
impl Neg for So3Algebra
Source§impl PartialEq for So3Algebra
impl PartialEq for So3Algebra
Source§impl RelativeEq for So3Algebra
impl RelativeEq for So3Algebra
Source§fn default_max_relative() -> Self::Epsilon
fn default_max_relative() -> Self::Epsilon
Source§fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon,
) -> bool
fn relative_eq( &self, other: &Self, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool
Source§fn relative_ne(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon,
) -> bool
fn relative_ne( &self, other: &Rhs, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool
RelativeEq::relative_eq.Source§impl Sub for So3Algebra
impl Sub for So3Algebra
impl AntiHermitianByConstruction for So3Algebra
so(3) algebra elements are anti-Hermitian by construction.
Real antisymmetric matrices satisfy A^T = -A, which over ℝ is equivalent to A† = -A (anti-Hermitian).
impl Copy for So3Algebra
impl StructuralPartialEq for So3Algebra
impl TracelessByConstruction for So3Algebra
so(3) algebra elements are traceless by construction.
The representation So3Algebra::new([f64; 3]) stores coefficients for
3×3 antisymmetric matrices. All antisymmetric matrices are traceless.
Auto Trait Implementations§
impl Freeze for So3Algebra
impl RefUnwindSafe for So3Algebra
impl Send for So3Algebra
impl Sync for So3Algebra
impl Unpin for So3Algebra
impl UnsafeUnpin for So3Algebra
impl UnwindSafe for So3Algebra
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.