28 throw std::invalid_argument(
"SO<N>::Hat: n<2 not supported");
31 assert(xi.size() == 1);
32 X << 0, -
xi(0),
xi(0), 0;
35 const size_t dmin = (n - 1) * (n - 2) / 2;
36 Hat(xi.tail(dmin), X.topLeftCorner(n - 1, n - 1));
39 double sign =
pow(-1.0, xi.size());
41 for (
size_t i = 0;
i < n - 1;
i++) {
42 const size_t j = n - 2 -
i;
43 X(n - 1, j) = -sign *
xi(i);
44 X(j, n - 1) = -
X(n - 1, j);
60 const size_t n = X.
rows();
61 if (n < 2)
throw std::invalid_argument(
"SO<N>::Hat: n<2 not supported");
70 const size_t d = n * (n - 1) / 2;
74 double sign =
pow(-1.0, xi.size());
75 for (
size_t i = 0;
i < n - 1;
i++) {
76 const size_t j = n - 2 -
i;
77 xi(i) = -sign *
X(n - 1, j);
82 const size_t dmin = (n - 1) * (n - 2) / 2;
83 xi.tail(dmin) =
Vee(X.topLeftCorner(n - 1, n - 1));
109 const size_t n =
rows(),
n2 = n *
n;
121 const size_t d =
dim();
123 for (
size_t i = 0;
i <
n;
i++) {
124 H->block(
i * n, 0, n, d) =
matrix_ * P.block(
i * n, 0, n, d);
static MatrixNN Hat(const TangentVector &xi)
SO inverse() const
inverse of a rotation = transpose
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar * data() const
static Matrix VectorizedGenerators()
Calculate N^2 x dim matrix of vectorized Lie algebra generators for SO(N)
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy y set format x g set format y g set format x2 g set format y2 g set format z g set angles radians set nogrid set key title set key left top Right noreverse box linetype linewidth samplen spacing width set nolabel set noarrow set nologscale set logscale x set set pointsize set encoding default set nopolar set noparametric set set set set surface set nocontour set clabel set mapping cartesian set nohidden3d set cntrparam order set cntrparam linear set cntrparam levels auto set cntrparam points set size set set xzeroaxis lt lw set x2zeroaxis lt lw set yzeroaxis lt lw set y2zeroaxis lt lw set tics in set ticslevel set tics set mxtics default set mytics default set mx2tics default set my2tics default set xtics border mirror norotate autofreq set ytics border mirror norotate autofreq set ztics border nomirror norotate autofreq set nox2tics set noy2tics set timestamp bottom norotate set rrange [*:*] noreverse nowriteback set trange [*:*] noreverse nowriteback set urange [*:*] noreverse nowriteback set vrange [*:*] noreverse nowriteback set xlabel matrix size set x2label set timefmt d m y n H
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
void g(const string &key, int i)
MatrixNN matrix_
Rotation matrix.
static size_t AmbientDim(size_t d)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void resize(Index rows, Index cols)
EIGEN_DEVICE_FUNC const SignReturnType sign() const
Class compose(const Class &g) const
A matrix or vector expression mapping an existing expression.
MatrixDD AdjointMap() const
Adjoint map.
Class between(const Class &g) const
static MatrixDD IdentityJacobian(size_t n)
const SO< N > & derived() const
Jet< T, N > pow(const Jet< T, N > &f, double g)
The matrix class, also used for vectors and row-vectors.
static TangentVector Vee(const MatrixNN &X)
Inverse of Hat. See note about xi element order in Hat.
N*N matrix representation of SO(N). N can be Eigen::Dynamic.
VectorN2 vec(OptionalJacobian< internal::NSquaredSO(N), dimension > H={}) const
Eigen::Matrix< double, internal::NSquaredSO(N), 1 > VectorN2