-
Notifications
You must be signed in to change notification settings - Fork 7
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
Improve API ergonomics #82
Commits on Apr 12, 2024
-
Configuration menu - View commit details
-
Copy full SHA for c8bb79e - Browse repository at this point
Copy the full SHA c8bb79eView commit details -
feat: instance ergonomics for member variables
Introduces: - `SatInstance::var_manager_ref()` - `SatInstance::var_manager_mut()` - `SatInstance::n_vars()` - `OptInstance::constraints_ref()` - `OptInstance::constraints_mut()` - `OptInstance::objective_ref()` - `OptInstance::objective_mut()` - `MultiOptInstance::constraints_ref()` - `MultiOptInstance::constraints_mut()` - `MultiOptInstance::objective_ref()` - `MultiOptInstance::objective_mut()` Deprecates: - `SatInstance::var_manager()` - `OptInstance::get_constraints()` - `OptInstance::get_objective()` - `MultiOptInstance::get_constraints()` - `MultiOptInstance::get_objective()`
Configuration menu - View commit details
-
Copy full SHA for 8d5a2ab - Browse repository at this point
Copy the full SHA 8d5a2abView commit details -
feat: ergonomics for opb writing
Make `to_opb` and similar opb writing functions take by reference instead of by value. Some still need to take mutable references, provide workarounds in documentation if additional guarantees are known.
Configuration menu - View commit details
-
Copy full SHA for 8caeaf5 - Browse repository at this point
Copy the full SHA 8caeaf5View commit details -
feat: ergonomics for dimacs writing
Make `to_dimacs` and similar dimacs writing functions take by reference instead of by value. For the high-level instance types mutable references are still needed; provide `Cnf::to_dimacs` and workarounds in documentation if additional guarantees are known.
Configuration menu - View commit details
-
Copy full SHA for 871e79c - Browse repository at this point
Copy the full SHA 871e79cView commit details -
feat: add
add_clause_ref
method toSolve
traitSince external libraries cannot easily take ownership anyway, for most solvers this is more reasonable. Add a default implementation for `add_clause` that can be overwritten for solvers that can truly take ownership.
Configuration menu - View commit details
-
Copy full SHA for bd499ec - Browse repository at this point
Copy the full SHA bd499ecView commit details
Commits on Apr 15, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 36d2fcf - Browse repository at this point
Copy the full SHA 36d2fcfView commit details -
Configuration menu - View commit details
-
Copy full SHA for f84765e - Browse repository at this point
Copy the full SHA f84765eView commit details -
- rename file writing methods `write_` rather than `to_` - make all file writing methods take references and return errors if not in right format - rename all heavy converters `into_` - rename all inplace converters `convert_to_`
Configuration menu - View commit details
-
Copy full SHA for 4086bac - Browse repository at this point
Copy the full SHA 4086bacView commit details -
Configuration menu - View commit details
-
Copy full SHA for f7ba7a9 - Browse repository at this point
Copy the full SHA f7ba7a9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9c605cb - Browse repository at this point
Copy the full SHA 9c605cbView commit details -
perf: avoid unnecessary cloning
in tests and two methods of `Objective` type
Configuration menu - View commit details
-
Copy full SHA for 3220ea1 - Browse repository at this point
Copy the full SHA 3220ea1View commit details -
Configuration menu - View commit details
-
Copy full SHA for af9d3fc - Browse repository at this point
Copy the full SHA af9d3fcView commit details