Closed YuriSizuku closed 1 year ago
Hey @YuriSizuku , thanks for your feedback!
The problem is that the Invert
function modifies the input matrix in-place so it expects an lvalue reference whereas the result of the operation H*P*(~H)
is an rvalue. lvalues / rvalues are a bit tricky, you can read about them here if you're not already familiar with them.
You can fix this problem by setting the result of H*P*(~H)
to a variable like so:
auto C = H*P*(~H);
bool success = BLA::Invert(C);
Or by using the Inverse
function instead:
auto C = BLA::Inverse(H*P*(~H));
Hope that helps!
Thank you very much.
Now I understand the difference of Invert
and Inverse
.
I followed this example HowToUse.ino.
I think it will be very helpful to add some documents or comments to show the difference of this two function.
Fair enough, in general I think the documentation for this library could be improved, but for now I added a bit more detail to HowToUse.ino.
Hope that helps!
Here is the example.
And error occurs no instance of overloaded function "BLA::Invert" matches the argument list argument types are: (BLA::Matrix<1, 1, float>)
It will be nice to implement this trivial situation.