pub struct RPlus { /* private fields */ }Expand description
An element of ℝ⁺, the multiplicative group of positive reals
Represented as a positive real number x > 0.
§Representation
We store the value directly (not logarithm) for intuitive interpretation. The logarithm is computed when needed for Lie algebra operations.
§Examples
use lie_groups::{LieGroup, RPlus};
// Create elements
let g = RPlus::from_value(2.0);
let h = RPlus::from_value(3.0);
// Group multiplication
let product = g.compose(&h);
assert!((product.value() - 6.0).abs() < 1e-10);
// Inverse
let g_inv = g.inverse();
assert!((g_inv.value() - 0.5).abs() < 1e-10);Implementations§
Source§impl RPlus
impl RPlus
Sourcepub fn from_value(value: f64) -> Self
pub fn from_value(value: f64) -> Self
Sourcepub fn from_value_clamped(value: f64) -> Self
pub fn from_value_clamped(value: f64) -> Self
Create ℝ⁺ element, clamping to positive range
For robustness when value might be near zero or negative due to numerical errors. Clamps to a small positive value.
§Examples
use lie_groups::RPlus;
let g = RPlus::from_value_clamped(-0.1);
assert!(g.value() > 0.0);Sourcepub fn from_log(log_value: f64) -> Self
pub fn from_log(log_value: f64) -> Self
Create from logarithm (exponential map)
Given x ∈ ℝ (Lie algebra), returns eˣ ∈ ℝ⁺.
§Examples
use lie_groups::RPlus;
let g = RPlus::from_log(0.0); // e⁰ = 1
assert!((g.value() - 1.0).abs() < 1e-10);
let h = RPlus::from_log(1.0); // e¹ ≈ 2.718
assert!((h.value() - std::f64::consts::E).abs() < 1e-10);Trait Implementations§
Source§impl LieGroup for RPlus
impl LieGroup for RPlus
Source§const MATRIX_DIM: usize = 1
const MATRIX_DIM: usize = 1
Matrix dimension in the fundamental representation. Read more
Source§type Algebra = RPlusAlgebra
type Algebra = RPlusAlgebra
Associated Lie algebra type. Read more
Source§fn conjugate_transpose(&self) -> Self
fn conjugate_transpose(&self) -> Self
Adjoint representation element (for matrix groups: conjugate transpose). Read more
Source§fn adjoint_action(&self, algebra_element: &RPlusAlgebra) -> RPlusAlgebra
fn adjoint_action(&self, algebra_element: &RPlusAlgebra) -> RPlusAlgebra
Adjoint representation:
Ad_g: 𝔤 → 𝔤 Read moreSource§fn distance_to_identity(&self) -> f64
fn distance_to_identity(&self) -> f64
Geodesic distance from identity: d(g, e) Read more
Source§fn exp(tangent: &RPlusAlgebra) -> Self
fn exp(tangent: &RPlusAlgebra) -> Self
Exponential map: 𝔤 → G Read more
Source§fn log(&self) -> LogResult<RPlusAlgebra>
fn log(&self) -> LogResult<RPlusAlgebra>
Logarithm map: G → 𝔤 (inverse of exponential) Read more
Source§fn distance(&self, other: &Self) -> f64
fn distance(&self, other: &Self) -> f64
Distance between two group elements: d(g, h) Read more
Source§fn is_near_identity(&self, tolerance: f64) -> bool
fn is_near_identity(&self, tolerance: f64) -> bool
Check if this element is approximately the identity. Read more
Source§fn trace_identity() -> f64
fn trace_identity() -> f64
Trace of the identity element Read more
Source§fn reorthogonalize(&self) -> Self
fn reorthogonalize(&self) -> Self
Project element back onto the group manifold using Gram-Schmidt orthogonalization. Read more
Source§impl MulAssign<&RPlus> for RPlus
impl MulAssign<&RPlus> for RPlus
Source§fn mul_assign(&mut self, rhs: &RPlus)
fn mul_assign(&mut self, rhs: &RPlus)
Performs the
*= operation. Read moreimpl Abelian for RPlus
ℝ⁺ is abelian: a · b = b · a for all positive reals.
impl Copy for RPlus
impl StructuralPartialEq for RPlus
Auto Trait Implementations§
impl Freeze for RPlus
impl RefUnwindSafe for RPlus
impl Send for RPlus
impl Sync for RPlus
impl Unpin for RPlus
impl UnsafeUnpin for RPlus
impl UnwindSafe for RPlus
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
Mutably borrows from an owned value. Read more
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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
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
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
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.