farm-ng-core
identity.h
Go to the documentation of this file.
1 // Copyright (c) 2011, Hauke Strasdat
2 // Copyright (c) 2012, Steven Lovegrove
3 // Copyright (c) 2021, farm-ng, inc.
4 //
5 // Use of this source code is governed by an MIT-style
6 // license that can be found in the LICENSE file or at
7 // https://opensource.org/licenses/MIT.
8 
9 #pragma once
10 
12 #include "sophus/lie/lie_group.h"
13 
14 namespace sophus {
15 
16 // definition: identity mapping in R^n
17 // <==> origin, direction and distance preserving mapping R^n
18 // <==> origin, direction, shape and size preserving mapping R^n
19 
20 template <class TScalar, int kDim>
21 class Identity : public lie::Group<
22  lie::IdentityWithDim<kDim>::template Group,
23  TScalar,
24  lie::IdentityWithDim<kDim>::template Impl> {
25  public:
26  Identity() = default;
27 
28  explicit Identity(UninitTag /*unused*/) {}
29 
30  template <class TOtherScalar>
31  auto cast() const -> Identity<TOtherScalar, kDim> {
33  this->params_.template cast<TOtherScalar>());
34  }
35 };
36 
37 template <class TScalar>
39 template <class TScalar>
41 
42 } // namespace sophus
sophus::lie::Group
Definition: lie_group.h:24
sophus
Image MutImage, owning images types.
Definition: num_diff.h:20
sophus::lie::Group< lie::IdentityWithDim< kDim >::template Group, TScalar, lie::IdentityWithDim< kDim >::template Impl >::fromParams
static auto fromParams(Params const &params) -> Derived
Definition: lie_group.h:79
sophus::lie::Group< lie::IdentityWithDim< kDim >::template Group, TScalar, lie::IdentityWithDim< kDim >::template Impl >::params_
Params params_
Definition: lie_group.h:265
sophus::Identity::Identity
Identity(UninitTag)
Definition: identity.h:28
sophus::Identity::cast
auto cast() const -> Identity< TOtherScalar, kDim >
Definition: identity.h:31
sophus::Identity
Definition: identity.h:21
lie_group.h
sophus::Identity::Identity
Identity()=default
identity.h
sophus::UninitTag
Definition: common.h:70