Lishen1 / manif-rs

A small library for Lie theory

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

manif

A small library for Lie theory

Unofficial partial port of manif

Warning WIP

TODO

  • impl SO2
  • impl SE2
  • impl SE3
  • move common tests to macroses
  • move some impl into trait defaults
  • add docs

Available Operations

Operation Code
Base Operation
Inverse $\mathbf\Phi^{-1}$ X.manif_inverse()
Composition $\mathbf{\mathcal{X}}\circ\mathbf{\mathcal{Y}}$ X * Y
X.compose(Y)
Hat $\varphi^\wedge$ w.hat()
Act on vector $\mathbf{\mathcal{X}}\circ\mathbf v$ X.act(v)
Retract to group element $\exp(\mathbf\varphi^\wedge)$ w.exp_map()
Lift to tangent space $\log(\mathbf{\mathcal{X}})^\vee$ X.log_map()
Manifold Adjoint $\text{Adj}(\mathbf{\mathcal{X}})$ X.adj()
Tangent adjoint $\text{adj}(\mathbf{\varphi^\wedge})$ w.small_adj()
Composed Operation
Manifold right plus $\mathbf{\mathcal{X}}\oplus\mathbf\varphi = \mathbf{\mathcal{X}}\circ\exp(\mathbf\varphi^\wedge)$ X + w
X.plus(w)
X.rplus(w)
Manifold left plus $\mathbf{\mathbf\varphi\oplus\mathcal{X}} = \exp(\mathbf\varphi^\wedge)\circ\mathbf{\mathcal{X}}$ w + X
w.plus(X)
w.lplus(X)
Manifold right minus $\mathbf{\mathcal{X}}\ominus\mathbf{\mathcal{Y}} = \log(\mathbf{\mathcal{Y}}^{-1}\circ\mathbf{\mathcal{X}})^\vee$ X - Y
X.minus(Y)
X.rminus(Y)
Manifold left minus $\mathbf{\mathcal{X}}\ominus\mathbf{\mathcal{Y}} =\log(\mathbf{\mathcal{X}}\circ\mathbf{\mathcal{Y}}^{-1})^\vee$ X.lminus(Y)
Between $\mathbf{\mathcal{X}}^{-1}\circ\mathbf{\mathcal{Y}}$ X.between(Y)
Inner Product $\langle\varphi,\tau\rangle$ w.inner(t)
Norm $\left\lVert\varphi\right\rVert$ w.weightedNorm()
w.squaredWeightedNorm()

Above, $\mathbf{\mathcal{X}},\mathbf{\mathcal{Y}}$ represent group elements, $\mathbf\varphi^\wedge,\tau^\wedge$ represent elements in the Lie algebra of the Lie group, $\mathbf\varphi,\tau$ or w,t represent the same elements of the tangent space but expressed in Cartesian coordinates in $\mathbb{R}^n$, and $\mathbf{v}$ or v represents any element of $\mathbb{R}^n$.

Jacobians

All operations come with their respective analytical Jacobian matrices. Throughout manif, Jacobians are differentiated with respect to a local perturbation on the tangent space. These Jacobians map tangent spaces, as described in this paper.

Currently, manif implements the right Jacobian, whose definition reads:

$\frac{\delta f(\mathbf{\mathcal{X}})}{\delta\mathbf{\mathcal{X}}}\triangleq\displaystyle{\lim_{\mathbf\varphi\to0}}\frac{f(\mathcal{X}\oplus\mathbf\varphi)\ominus f(\mathcal{X})}{\mathbf\varphi}\triangleq \displaystyle{\lim_{\mathbf\varphi\to0}}\frac{log(f(\mathcal{X})^{-1}f(\mathcal{X}\exp(\mathbf\varphi^\wedge)))^{\vee}}{\mathbf\varphi}$

The Jacobians of any of the aforementionned operations can then be evaluated:

License

GNU GPLv3

About

A small library for Lie theory

License:GNU General Public License v3.0


Languages

Language:Rust 100.0%