1 #ifndef SOPHUS_TYEPES_HPP 2 #define SOPHUS_TYEPES_HPP 4 #include <Eigen/Geometry> 9 template <
class Scalar,
int M,
int Options = 0>
10 using Vector = Eigen::Matrix<Scalar, M, 1, Options>;
12 template <
class Scalar,
int Options = 0>
17 template <
class Scalar,
int Options = 0>
22 template <
class Scalar>
27 template <
class Scalar>
32 template <
class Scalar>
37 template <
class Scalar,
int M,
int N>
38 using Matrix = Eigen::Matrix<Scalar, M, N>;
40 template <
class Scalar>
45 template <
class Scalar>
50 template <
class Scalar>
55 template <
class Scalar>
60 template <
class Scalar>
66 template <
class Scalar>
69 static Scalar
impl(Scalar s0, Scalar s1) {
75 template <
class Scalar,
int M,
int N>
80 return (p0 - p1).norm();
84 template <
typename Scalar>
87 static void impl(Scalar& s) { s = Scalar(0); }
90 template <
typename Scalar,
int M,
int N>
96 template <
typename Scalar>
99 static Scalar
impl(Scalar
const& s) {
return s * s; }
102 template <
typename Scalar,
int N>
108 template <
typename Scalar>
111 static Scalar
impl(Scalar
const& s) {
return s; }
114 template <
typename Scalar,
int M,
int N>
118 return s.transpose();
149 template <
typename T>
162 using Line2 = Eigen::Hyperplane<T, 2>;
168 #endif // SOPHUS_TYEPES_HPP Vector3< float > Vector3f
Eigen::Hyperplane< T, 3 > Plane3
Matrix< Scalar, 4, 4 > Matrix4
Vector2< float > Vector2f
static Scalar impl(Matrix< Scalar, M, N > const &p0, Matrix< Scalar, M, N > const &p1)
auto setToZero(T &p) -> decltype(details::SetToZero< T >::impl(p))
static Scalar impl(Matrix< Scalar, N, 1 > const &s)
Eigen::Hyperplane< T, 2 > Line2
Matrix3< float > Matrix3f
Vector2< double > Vector2d
Vector7< double > Vector7d
Matrix< Scalar, 6, 6 > Matrix6
Vector3< double > Vector3d
Matrix4< float > Matrix4f
Vector7< float > Vector7f
Vector< Scalar, 6 > Vector6
Matrix2< double > Matrix2d
Matrix4< double > Matrix4d
static Scalar impl(Scalar const &s)
auto transpose(T const &p) -> decltype(details::Transpose< T >::impl(T()))
Vector< Scalar, 2, Options > Vector2
Vector6< float > Vector6f
Matrix6< float > Matrix6f
Vector4< float > Vector4f
static Matrix< Scalar, M, N > impl(Matrix< Scalar, M, N > const &s)
Eigen::Matrix< Scalar, M, N > Matrix
Matrix< Scalar, 7, 7 > Matrix7
Matrix3< double > Matrix3d
Vector< Scalar, 3, Options > Vector3
Matrix2< float > Matrix2f
Matrix7< float > Matrix7f
static Scalar impl(Scalar s0, Scalar s1)
Matrix< Scalar, 2, 2 > Matrix2
Eigen::Matrix< Scalar, M, 1, Options > Vector
Matrix< Scalar, 3, 3 > Matrix3
Matrix6< double > Matrix6d
Matrix7< double > Matrix7d
static void impl(Matrix< Scalar, M, N > &v)
Vector6< double > Vector6d
Vector< Scalar, 7 > Vector7
Vector< Scalar, 4 > Vector4
auto metric(T const &p0, T const &p1) -> decltype(details::Metric< T >::impl(p0, p1))
static void impl(Scalar &s)
auto squaredNorm(T const &p) -> decltype(details::SquaredNorm< T >::impl(p))
static Scalar impl(Scalar const &s)
Vector4< double > Vector4d