-
Notifications
You must be signed in to change notification settings - Fork 0
Solution to manage routing answers #158
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a structured Solution
type to encapsulate routing results, replacing the previous tuple-based approach for better type safety and code clarity.
- Adds a new
Solution<I, C>
struct to represent routing solutions with route and cost data - Refactors routing methods to return
Solution
instances instead of(Vec<ArrayIndex>, f32)
tuples - Updates all test cases to use the new
Solution
API methods
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.
File | Description |
---|---|
crates/revrt/src/solution.rs | Defines the new Solution struct with generic route and cost types |
crates/revrt/src/routing/mod.rs | Updates routing methods to return Solution instances and removes commented code |
crates/revrt/src/lib.rs | Integrates Solution usage and updates all test cases to use new API |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
New
Solution
to hold routing solution. More methods will be implemented, but for now the goal is to hide its composition to make it easier the larger refactoring under way.