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

feat(solver)!: Make Problem use builder pattern #62

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

eviltak
Copy link
Contributor

@eviltak eviltak commented Aug 8, 2024

Changes the Problem input struct (introduced in #54) to use the builder pattern.

This allows the soft_requirements field to be an Iterator rather than a Vec, which prevents having to unnecessarily clone the SolvableIds passed to soft_requirements (which in some cases could be on the order of hundreds of thousands). Also, this prevents adding a new input argument to Solver::solve (i.e. a new field in Problem) from being a breaking change.

The C++ bindings remain unchanged and rely on using a simple resolvo_cpp::Problem struct as before; they do not expose the builder pattern.

@eviltak eviltak force-pushed the solver-problem-builder branch from ddd67b2 to d04d742 Compare August 8, 2024 22:34
@baszalmstra baszalmstra merged commit 2700ea0 into mamba-org:main Aug 12, 2024
13 checks passed
@baszalmstra
Copy link
Contributor

Thanks as always! :)

@baszalmstra baszalmstra mentioned this pull request Aug 12, 2024
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.

2 participants