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 ManifoldFR requested a review from edantec September 17, 2024 14:45
@ManifoldFR ManifoldFR force-pushed the topic/cost-stack-map-and-cast branch from 9f470d4 to 83fb755 Compare September 17, 2024 14:46
@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
@ManifoldFR ManifoldFR force-pushed the topic/cost-stack-map-and-cast branch from 9b415a3 to 13452e5 Compare September 17, 2024 17:11
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 ManifoldFR force-pushed the topic/cost-stack-map-and-cast branch 3 times, most recently from a46d009 to 4c59e90 Compare September 18, 2024 15:48
@ManifoldFR ManifoldFR linked an issue Sep 18, 2024 that may be closed by this pull request
@ManifoldFR ManifoldFR force-pushed the topic/cost-stack-map-and-cast branch from 4c59e90 to f504102 Compare September 18, 2024 16:15
@ManifoldFR ManifoldFR force-pushed the topic/cost-stack-map-and-cast branch from f504102 to 33ac216 Compare September 18, 2024 16:33
@ManifoldFR ManifoldFR force-pushed the topic/cost-stack-map-and-cast branch from 33ac216 to 2388c20 Compare September 18, 2024 16:46
@ManifoldFR ManifoldFR disabled auto-merge September 18, 2024 17:30
@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