Draft: Feature/introduce retraction notion
Compare changes
I propopes an implementation of introducing different retraction types for the manifolds. This relates to issue #2 (closed).
It is implemented as a template parameter of the corresponding manifold
Implementation details
template <class T, int N, RetractionType RT=RetractionType::ExponentialMap>
class UnitVector
{
...
static UnitVector retr(const UnitVector& p, const EmbeddedTangentVector& ev) {
UnitVector result;
if constexpr (RT==RetractionType::ExponentialMap)
result= exp(p,ev);
else
result= closestPointProjection(p,ev);
return result;
}
Advantages
Drawbacks
Thoughts about this? Is this kind of PR procdeure ok for you @osander ? or should the procedure be different?