Registered Member
|
I am writing a wrapper to Eigen for my personal use and I encountered the following weird behavior:
I get different values of Q[0]. For instance, I get "-0.421857" and "-1.49563". Thanks |
Moderator
|
This question has been answered here: http://stackoverflow.com/questions/2210 ... sing-eigen
|
Registered Member
|
ggael, I added couple more questions in the comments over there. I would greatly appreciate if you could provide an answer for them as well.
|
Registered Member
|
@ggael If I implement what you have in the post on stack overflow, I then get the following:
|
Moderator
|
Works for me:
|
Registered Member
|
Thanks for replying. However, from the main, if I call as follows:
without explicitly specifying the size of the matrices $Q$ and $R$, it fails giving the error I mentioned. |
Moderator
|
oh, I see. right. Ref objects cannot be resized. If you need both features, then add one more overload with Matrix arguments which resize and then call the Ref<> version.
|
Registered Member
|
Thanks ggael. Could you be more explicit (ideally with an example) as to what you mean by
Also, if I were to pass the matrix to the function with prototype as follows:
I do not need to explicitly pass the size of Q and R. The size is need only when the function prototype is
The reason why I am interested in dynamic sizes is that if I want to do an SVD with a desired tolerance, the size of my matrices, U, S and V are not known apriori. I would like the function to figure out the sizes and then allocate appropriate memory. Thanks for your help. |
Moderator
|
then one version taking Matrix objects should be enough because you'll never be able to resize Map objects anyway.
|
Registered Member
|
I do not understand your statement. |
Registered users: Baidu [Spider], Bing [Bot], Google [Bot]