Skip to content
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

Fixed bugs introduced while converting from Python to C++ #129

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jasseeeem
Copy link

@jasseeeem jasseeeem commented Sep 2, 2024

While testing OCSort C++ code base, I noticed that few variables were not matching. On digging deeper, I found couple of bugs in the C++ code after comparing to Python code.

  1. A comma is given instead of multiplication operator resulting in the second operand F.transpose() being returned instead of (F * P) * F.transpose():
    Python code:
    P = (alpha * alpha) * dot(dot(F, P), F.T) + Q
    Incorrect C++ code:
    P = _alpha_sq * ((F * P), F.transpose()) + Q;
    Correct C++ code:
    P = _alpha_sq * ((F * P) * F.transpose()) + Q;

  2. Added an inverse operation that was present in the Python code, but not in the C++ code.

Note: There is no change in line 1 and 156.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant