interpolate.hpp
Go to the documentation of this file.
1 
4 #ifndef SOPHUS_INTERPOLATE_HPP
5 #define SOPHUS_INTERPOLATE_HPP
6 
7 #include <Eigen/Eigenvalues>
8 
10 
11 namespace Sophus {
12 
26 template <class G, class Scalar2 = typename G::Scalar>
28  G const& foo_T_bar, G const& foo_T_baz, Scalar2 p = Scalar2(0.5f)) {
29  using Scalar = typename G::Scalar;
30  Scalar inter_p(p);
31  SOPHUS_ENSURE(inter_p >= Scalar(0) && inter_p <= Scalar(1),
32  "p (%) must in [0, 1].");
33  return foo_T_bar * G::exp(inter_p * (foo_T_bar.inverse() * foo_T_baz).log());
34 }
35 
36 } // namespace Sophus
37 
38 #endif // SOPHUS_INTERPOLATE_HPP
Sophus::enable_if_t
typename std::enable_if< B, T >::type enable_if_t
Definition: common.hpp:221
SOPHUS_ENSURE
#define SOPHUS_ENSURE(expr,...)
Definition: common.hpp:137
Sophus::interpolate
enable_if_t< interp_details::Traits< G >::supported, G > interpolate(G const &foo_T_bar, G const &foo_T_baz, Scalar2 p=Scalar2(0.5f))
Definition: interpolate.hpp:27
interpolate_details.hpp
Sophus
Definition: average.hpp:17


sophus
Author(s): Hauke Strasdat
autogenerated on Wed Mar 2 2022 01:01:47