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

[modelling] Change CostStack backend to an unordered_map type #199

Merged
merged 12 commits into from
Sep 18, 2024

Conversation

ManifoldFR
Copy link
Member

  • Also adds a template getter for the component cost functions
  • addCost() now has an overload taking a key (either a std::size_t or a string)
  • addCost() returns a reference to the pair of cost function component and weight

Resolves #195

@ManifoldFR
Copy link
Member Author

ManifoldFR commented Sep 17, 2024

Some features in this PR (exposing the underlying map type directly to Python) will require the next version of eigenpy, following stack-of-tasks/eigenpy#504 which generalizes @edantec's work added in eigenpy 3.9.0

Maybe we could do some conditional compilation

@ManifoldFR ManifoldFR linked an issue Sep 17, 2024 that may be closed by this pull request
3 tasks
edantec
edantec previously approved these changes Sep 18, 2024
Copy link
Collaborator

@edantec edantec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from a small question, everything seems fine to me

include/aligator/modelling/costs/sum-of-costs.hxx Outdated Show resolved Hide resolved
@ManifoldFR
Copy link
Member Author

I'll force merge cos I'm the boss here

@ManifoldFR ManifoldFR merged commit 18427a5 into devel Sep 18, 2024
35 checks passed
@ManifoldFR ManifoldFR deleted the topic/cost-stack-map-and-cast branch September 18, 2024 17:30
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.

Replace vector of CostPtr in CostStack objects by a map of CostPtr Integrate dynamic cast in aligator
2 participants