-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add trivial groups Rn #109
Conversation
@joansola This PR is not fully finished yet but ready for a first round of review. FYI I'm experiencing some test regression on my machine. Some SO3 test are failing due to precision, some other results (sometime) in segfault. |
@markusgft FYI. |
Codecov Report
@@ Coverage Diff @@
## devel #109 +/- ##
==========================================
+ Coverage 98.08% 98.21% +0.13%
==========================================
Files 32 36 +4
Lines 1046 1123 +77
==========================================
+ Hits 1026 1103 +77
Misses 20 20 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Voila my first round of review.
@@ -8,9 +8,7 @@ | |||
#define MANIF_TEST(manifold) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you run all the standard tests on Rn?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does your answer still apply after further commits?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, only the documentation-related test is failing. I'll look it up.
OK good job. We have a warning TODO on the |
A side, general question: Why Rn and not e.g. Tn? In the paper I wrote T(n) for these groups. T is for 'translation'. This comment is no big deal. But it might be interesting to come up with a name that the community can feel right. |
Yeah I could use the macro that throws a 'Not implemented yet' message for safety. |
I used |
I know of some properties of smallAdj but I am afraid they only hold for multiplicative groups: for x,y \in Tangent, then adj_x * y = vee( xy - yx) For additive groups this may collapse to a trivial thing, since x*y = x+y and then the whole thing goes to zero -- does this mean that smallAdj = 0? This is the mistery and the danger by now. |
I tend to favor T(n). But unlike SO(n) which are well established, and also S^n, the name T(n) I just invented it from thin air in the paper. I have seen T(n) to signify the torus of dimension n, which is another thing. |
Ok then we have to be careful, maybe Tn is not the best solution. |
From Wikipedia https://en.wikipedia.org/wiki/Translation_(geometry)
From wikipedia https://en.wikipedia.org/wiki/Euclidean_group
From StackExchange https://math.stackexchange.com/questions/666870/generators-of-translation-lie-algebra
I feel going for T(n) is safe. I do not like R^n because it is not a group, it is a set, or a space, and it lacks the group law of composition. You could say that T(n) = {R(n), +}. |
Did you mean,
|
Ok then I'll rename to |
Yes and no. We are mixing lie algebra and vector representations of the tangent elements x and y. Also, the small adjoint that we have is in reality the small adjoint matrix. Here are the equivalences: Given:
In Lie algebra, we have
In vector space we have
where 'v' is the vee operator. The two forms above are equivalent because of the isomorphism relating the vector space and the Lie algebra. But, the thing is, in additive groups like the one we are handling, we have
and so I am a little confused as to what is the small adjoint in such case. Following this reasoning, it should be simply |
Oh yeah I had forgot that distinction |
BTW, one way to see this is the following: Consider T(n) as the subgroup of SE(n) with null rotation (that is, R = I). Then, the adjoint of T(n) and the adjoint of SE(n) should be equal if we set theta=0 in the adjoint of SE(n). Of course the adjoint of SE(n) has a larger dimension. We must look at the translation part only. But if it happens that in SE(n) we have adj = 0 when theta=0, then we can conclude that the adjoint of T(n) is also zero. |
According to wikipedia https://en.wikipedia.org/wiki/Table_of_Lie_groups The group name is finally R^n !!!! :-) |
All my research leads to smallAdj = 0_{nxn}. But let us not claim victory yet. |
Great, less work for me :) |
Another way to see it is through the formula given by Eade and Fourmy etal
which is an infinite sum of powers of |
OK Just for the fun of it. Another way to show that the small adjoint is zero. Take the matrix form of the group. For translations Now the small adjoint operator is
which is a perfect zero. The matrix version is consequently zero too:
since this is true for all
voila. (again, 'v' is the vee operator and returns a vector from a matrix in the Lie algebra). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is OK for me now.
CI is happy now! |
@artivis FYI
full log of failed tests:
These errors are very unlikely--> We are testing that the linear approximation is good enough. But in Rn, the linear approximation should be exact!!!
with f(X,Y) = X+Y and J_d = I , this reduces to
and
so the relation is exactly equal !!!! |
BTW the failed tests above were on my Mac OSX. Maybe on Linux the error is slightly smaller and the tests pass. But see my comments above: the test should pass with error zero!!! |
No idea what can cause this test regression! Maybe investigating the Rn tests (comments above) we can find a common cause for all these weakly passing tests? |
See #114. |
What's the status of this PR? I have one only concern: that I guess we can live with it, but strictly speaking in the translation vector group |
I just replaced |
@artivis but then how about the test of (x.smallAdj() * y).hat() = x.hat() * y.hat() - y.hat() * x.hat() ; what is the Solving this consistently is not easy:
The only way out I suppose is to have the test redefined as so: x.smallAdj() * y = x.bracket(y) For matrix Lie groups (and maybe for many multiplicative groups), the bracket is defined as x.bracket(y) = x*y - y*x But this cannot be the case for additive groups such as Rn. The Lie bracket in Rn is zero, x.bracket(y) = 0 This is why I said that we could 'live' with All thhese changes could make the point for a new issue and a new PR. But for the time being, defining CONCLUSION: I cannot approve this PR as it is now. |
Inconsistent definition of x.hat()
with test on smallAdj
in group Rn
@markusgft, the plan is to wait for #30 to land before merging this. This should happen sooner than later. |
In Ei(i, RnTangentBase<Derived>::DoF) = 1; Ei is a column vector, the second index RnTangentBase::DoF out of bound. |
Hi @minrui-hust, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you address the x.hat()
definition as we spoke? This PR is old and I lost track of all issues, but I do remember that x.hat()
needed attention. I have seen a commit about this being reverted today, fc52aa3, and I am a little confused of what has been going on regarding this.
I did revert the change to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK for me with the temporary fix of x.hat()
using that of the matrix translation group.
I cleaned up the commit history hence the force-push. |
Add the trivial groups Rn.
Close #108.