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

Add cost stamps #1745

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Add cost stamps #1745

wants to merge 3 commits into from

Conversation

dmwever
Copy link
Contributor

@dmwever dmwever commented Jan 22, 2025

fixes #1676.

/**
* Cost field values.
*/
std::unordered_map<size_t, cost_stamp_t> cost_stamps;
Copy link
Contributor

@jere8184 jere8184 Jan 22, 2025

Choose a reason for hiding this comment

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

Would vector<optional<cost_stamp_t>> cost_stamps work better?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Didn't know about the existence of optionals. Basically, have a vector the same size as the cost field, with optionals consisting of cost_stamp_t?

Copy link
Contributor

Choose a reason for hiding this comment

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

yeh exactly, might be more performant, but would have to be tested. Just a suggestion though.

https://en.cppreference.com/w/cpp/utility/optional

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.

Cost stamps (pathfinder)
2 participants