artivis / manif

A small C++11 header-only library for Lie theory.
https://artivis.github.io/manif
MIT License
1.52k stars 246 forks source link

Group action on different objects #119

Open artivis opened 4 years ago

artivis commented 4 years ago

At the moment, the act function treats its input argument as a point and act on it accordingly (e.g. SE2 rotates and translates). It would be great if act could act appropriately on different objects, likely vectors and points at first.

Options

This calls for a rethinking/redesign of the function with the following options:

  1. distinguish objects with a runtime flag (likely an enum)
  2. distinguish objects with a compile-time flag (e.g. struct assumePoint )
  3. specialize the function for different objects types.

Pro/cons:

1.

Pro:

Cons:

2.

Pro:

Cons:

3.

Pro:

Cons:

Pseudo-code for each options:

  1. act( obj, Ja, Jb, flag )
  2. act< flag >( obj, Ja, Jb )
  3. act( Vector, Ja, Jb ) act( Point, Ja, Jb )
artivis commented 4 years ago

@joansola I thrown here a few initial ideas on improving act, any thoughts?? Notice that, at the moment, I tend to favor option 3.

I'll edit the ticket to keep it up to date with the discussion.

joansola commented 6 months ago

Complex groups are SE(3), SE_2(3), Sgal(3).

I was thinking, regarding act() in all complex groups. Maybe we could have special actions. In case e.g. of SGal3, we would have:

and other possible actions only available for this group.

In SE3 we have a similar problem, in

In manif we already have some examples on non-abstracted methods:

so I see no fundamental impediment for act(). In fact, it is possible that act() as an abstract form is not convenient, precisely because actions are not pre-defined operations for Lie groups in their abstract form.